How to Install and Configure CloudLinux on cPanel
The following guide will walk you through how to install CloudLinux and configure things like the PHP Selector, MySQL Governor, CageFS, and the LVE Manager, and others.
Installing CloudLinux
Before you can install CloudLinux, you must have either a key, or an IP based license. When you purchased your license through NDC Host, you are issued an IP based license.
Log in to your server through SSH
Use the following sections to start installing CloudLinux:
For IP based license
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy sh cldeploy -i
Once this is complete, reboot the server to start on the new CloudLinux Kernel.
For Key based license
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy sh cldeploy -k <insert key here>
Once this is complete, reboot the server to start on the new CloudLinux Kernel.
Installing the LVE Manager and CageFS
Once CloudLinux has been installed, you will need to install the LVE and CageFS to be able to use the rest of the features.
Run the following commands:
yum -y install lvemanager cagefs cagefsctl --init cagefsctl --enable-all
Setting up LVEmanager in WHM
Once that has been installed, a new option in WHM will be under Plugins. Cloudlinux LVE Manager will allow you to see packages and usage settings. You can change available resources by WHM package type.
Installing MySQL Governor
If you are using MySQL, run the following:
yum remove db-governor db-governor-mysql yum install governor-mysql /usr/share/lve/dbgovernor/mysqlgovernor.py --install
If you are using MariaDB:
MariaDB v5.5 55 MariaDB v10.0 100 MariaDB v10.1 101
yum install governor-mysql /usr/share/lve/dbgovernor/db-select-mysql --mysql-version=mariadbXX /usr/share/lve/dbgovernor/mysqlgovernor.py --install
Configuring MySQL Governor
To configure and use the MySQL governor, you will need to use the dbctl command in the command line. This feature does not have a cPanel or WHM interface.
Installing PHP Selector
Run the following from the command line:
yum groupinstall alt-php yum update cagefs lvemanager
Configuring the PHP Selector
Once the PHP selector has been installed, you can configure the base options for each version of PHP inside of WHM under the CloudLinux LVE Manager. To change versions per cPanel account, log in to cPanel and make the changes under the Select PHP Version button under Software.
Installing Python and Ruby Selector
Very similar to the PHP Selector, you can also install the Python and Ruby selectors to be able to change your versions on the fly as well as create directories for projects inside of cPanel.
Run the following commands in SSH to install the Python and Ruby selectors:
yum install lvemanager alt-python-virtualenv alt-mod-passenger yum groupinstall alt-python yum groupinstall alt-ruby yum install alt-python27-devel
Configuring the Python and Ruby Selector
Once the selectors have been installed, you can access them inside of cPanel under Software
Installing Apache mod_lsapi
Apache mod_lsapi is based on the Litespeed apache replacement. It can improve performance for many web sites.
Requirements
CageFS (installed and initialized) Alt-PHP Apache with SuExecuUserGroup directive for each user's VirtualHost mod_ruid2 disabled apache itk disabled
Installing Apache mod_lsapi
Log into SSH and run the following commands:
yum install liblsapi liblsapi-devel --enablerepo=cloudlinux-updates-testing yum install cpanel-mod-lsapi --enablerepo=cloudlinux-updates-testing /usr/bin/switch_mod_lsapi --setup /usr/bin/switch_mod_lsapi --enable-global service httpd restart
mod_lsapi does not require any additional configuration and is ready to start using immediately after installing.
Installing OptimumCache
OptimumCache is a file cache system specifically designed to help speed up shared hosting. This means that common CMS platforms like WordPress and Joomla will see a lot of benefit with this installed.
To install this run the following in SSH:
yum install optimumcache
Configuring OptimumCache
OptimumCache is very easy to configure for a basic cPanel setup. If you have your home directory somewhere else, be sure to modify the command to point OptimumCache to the right place.
Run the following command to configure OptimumCache:
occtl --recursive --mark-dir /home