CloudLinux + cPanel Installation: Difference between revisions

From Leo's Notes
This page was last edited on 1 September 2019, at 06:22.
Created page with "This is a brief guide on setting up CloudLinux (6.4), cPanel, and softaculous. == CloudLinux == Set it up using PXE or DVD. For my particular server, I have set my parition ..."
 
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
 
(10 intermediate revisions by the same user not shown)
Line 3: Line 3:
== CloudLinux ==
== CloudLinux ==


Set it up using PXE or DVD. For my particular server, I have set my parition scheme up like so:
Install CloudLinux using PXE or DVD.
 
For my particular server, I have set my partition scheme up like so:


<syntaxhighlight lang="text" line start="1" enclose="div">
<syntaxhighlight lang="text" line start="1" enclose="div">
Line 15: Line 17:
</syntaxhighlight >
</syntaxhighlight >


Since cPanel runs out of /usr/local/cpanel, and because logs are placed in /usr/local/apache/logs by default, it's a good idea to give it as much room as possible. The databases and configuration files for cPanel will be placed in <code>/var</code>. Your user's contents will be placed in their home directories in <code>/home</code>.
Since cPanel runs out of {{code|/usr/local/cpanel}}, and because logs are placed in {{code|/usr/local/apache/logs}}, it's a good idea to give {{code|/usr/local}} as much room as possible. The databases and configuration files for cPanel will be placed in {{code|/var}}. Your user's contents will be placed in their home directories in {{code|/home}}. For performance considerations, try putting {{code|/var}} and {{code|/home}} on a fast storage device.


Once the install is done, you will need to activate the license with CloudLinux's CLN. To do so, run:
Once the install is done, you will need to activate the license with CloudLinux's CLN. To do so, run:
  /usr/sbin/rhnreg_ks --activationkey=xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx
  /usr/sbin/rhnreg_ks --activationkey=xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx


The activation key is found on your CLN account.  
The activation key is found on your CLN account at https://cln.cloudlinux.com/rhn/activationkeys/List.do


Once activated, you will then be able to update the system.
Once activated, you will be able to update the system.
  yum -y update
  yum -y update


Line 32: Line 34:
  sh latest
  sh latest


Depending on your system, the install process will take about an hour. Once completed, you should reboot the system.
Depending on your system, the install process will take about an hour. Once completed, you should reboot the system.  
 
Login to WHM by going to https://serverip:2087/ to finish the install process. You may need to set up your license if cPanel was unable to activate itself. If the license doesn't work, you may want to doublecheck your license's IP address on your account at http://store.cpanel.net/


== Installing Softaculous ==
== Installing Softaculous ==
Line 43: Line 47:
  ./install.sh
  ./install.sh


[[Category:Linux]] [[Category:Services]] [[Category:Guides]]
=== Troubleshooting ===
 
One instance of Softaculous stopped working and kept returning a 500 Server Error after a timeout (around 30 seconds to 1 minute). This could be related to the server's upgrade from EasyApache 3 to EasyApache 4 which caused PHP to change.
 
The IonCube loader was definitely installed and loaded, but running {{code|/usr/local/cpanel/3rdparty/php/56/bin/php-cgi /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/index.php}} even in the terminal doesn't work since it returns {{highlight|lang=text|code=
Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.30
Content-type: text/html; charset=UTF-8
}} with exit code 255.
 
After stracing the PHP execution of the script, it looks like these two files was the cause:
* {{code|/usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/iscripts.php}}
* {{code|/usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/scripts.ser}}
 
The files appear to be incomplete (the PHP file contains an incomplete array, and the .ser file looks to be truncated).
 
Removing the two files fixed Softaculous.
 
{{Navbox Linux}}[[Category:Linux]]
[[Category:Services]] [[Category:Guides]]

Latest revision as of 06:22, 1 September 2019

This is a brief guide on setting up CloudLinux (6.4), cPanel, and softaculous.

CloudLinux

Install CloudLinux using PXE or DVD.

For my particular server, I have set my partition scheme up like so:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        20G  1.3G   18G   7% /
tmpfs            32G     0   32G   0% /dev/shm
/dev/sdb2       500G  198M  475G   1% /home
/dev/sda3       9.9G  151M  9.2G   2% /tmp
/dev/sda5       214G  188M  203G   1% /usr/local
/dev/sdb1        50G  425M   47G   1% /var

Since cPanel runs out of /usr/local/cpanel, and because logs are placed in /usr/local/apache/logs, it's a good idea to give /usr/local as much room as possible. The databases and configuration files for cPanel will be placed in /var. Your user's contents will be placed in their home directories in /home. For performance considerations, try putting /var and /home on a fast storage device.

Once the install is done, you will need to activate the license with CloudLinux's CLN. To do so, run:

/usr/sbin/rhnreg_ks --activationkey=xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx

The activation key is found on your CLN account at https://cln.cloudlinux.com/rhn/activationkeys/List.do

Once activated, you will be able to update the system.

yum -y update

Installing cPanel

As per the instructions on cPanel's website, to start the cPanel installation process, run:

cd /home
wget -N http://httpupdate.cpanel.net/latest
sh latest

Depending on your system, the install process will take about an hour. Once completed, you should reboot the system.

Login to WHM by going to https://serverip:2087/ to finish the install process. You may need to set up your license if cPanel was unable to activate itself. If the license doesn't work, you may want to doublecheck your license's IP address on your account at http://store.cpanel.net/

Installing Softaculous

In order for softaculous to work on cPanel, you must activate Ioncube for cPanel's PHP engine through WHM (Server Configuration -> Tweak Settings -> PHP -> check ioncube next to 'cPanel PHP Loader').

Start the install process by running:

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh

Troubleshooting

One instance of Softaculous stopped working and kept returning a 500 Server Error after a timeout (around 30 seconds to 1 minute). This could be related to the server's upgrade from EasyApache 3 to EasyApache 4 which caused PHP to change.

The IonCube loader was definitely installed and loaded, but running /usr/local/cpanel/3rdparty/php/56/bin/php-cgi /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/index.php even in the terminal doesn't work since it returns

Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.30
Content-type: text/html; charset=UTF-8

with exit code 255.

After stracing the PHP execution of the script, it looks like these two files was the cause:

  • /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/iscripts.php
  • /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/scripts.ser

The files appear to be incomplete (the PHP file contains an incomplete array, and the .ser file looks to be truncated).

Removing the two files fixed Softaculous.