Step by step install Cpanel in cloudlinux with Litespeed server, imunify360 proactive defense. If you want to add extra disk in CPanel then its perfect blog because sometime Cpanel quota does not show disk usages which show disk usages 0 so if you want the correct solution then this blog is the perfect solution.
Converting to CloudLinux
It is easy to switch the server from CentOS 5.x, 6.x or 7.x to CloudLinux as it is interchangeable with CentOS. The CloudLinux OS installation process takes a few minutes and replaces a handful of RPMs. Before the conversion of your CentOS server to CloudLinux, you must have an activation key. The activation key can be either obtained by a trial subscription or by purchasing a subscription. Follow the steps below to receive a trial activation key.
1) Go to https://cln.cloudlinux.com/clweb/register.html and register with CloudLinux Network.
2) You will receive an email with an activation link.
3) Log in at https://cln.cloudlinux.com/clweb/login.html
4) Click on Get Trial Activation Key.
You will get a key that looks like: 17514-d34463a172feio4f4e7b191a1841bcf2
After obtaining the CloudLinux activation key, download the script for CloudLinux installation and execute it. Please note that you must have root-level access to your server to perform the steps below.
1) Connect to your server via SSH as root user.
2) Download the CloudLinux installation script: cldeploy. Enter the following command on your server shell or terminal.
3) Execute the downloaded script by running the following command. The script will install CloudLinux kernel, Apache module, PAM module, command line tools as well as LVE Manager.
- $ sh cldeploy -k 115964-CLN-2d293a968e7f4a101c7e8c9907f13487 # if you have activation key
- $ sh cldeploy -i # if you have IP based license
4) Once the installation is complete, reboot the server by using the following command.
- $ reboot
5) Verify the conversion to CloudLinux. Run the following command on your server to verify the conversion to CloudLinux and you may see a similar output.
- $ cat /etc/redhat-release
CloudLinux release 7.3
You server is now running CloudLinux Kernel with LVE enabled.
- # hostnamectl
- df -h
- setenforce 0
- vi /etc/sysconfig/selinux
# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
# SELINUXTYPE= can take one of three two values:
# targeted – Targeted processes are protected,
# minimum – Modification of targeted policy. Only selected processes are protected.
# mls – Multi Level Security protection.
Lets install cPanel to your CloudLinux or Centos 7
#yum install perl
#hostnamectl set-hostname server101.arnhost.com
# cd /home
# curl -o latest -L https://securedownloads.cpanel.net/latest
# sh latest
Activate cpanel License
If you install cPanel after that for fine-tuning you can run below command.
yum reinstall -y lvemanager lve-utils cagefs alt-python27-cllib
Install LiteSpeed WHM plugin
- cd /usr/src; curl https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh | sh
- rm -f lsws_whm_plugin_install.sh
- Click the “LiteSpeed Web Server” plugin. (In the “Plugins” section at the bottom of the scroll menu)
- Click “Install LiteSpeed Web Server”
- Fill in the form to sepecify
- Trial license key or serial number
- LiteSpeed target installation directory
- Port Offset (set to 0 to replace Apache otherwise set a number like “2000” for example to try LiteSpeed on port 2080)
- Whether to enable PHP SuEXEC
- Your Administrators email address.
- Username and password for LWSW WebAdmin Console
- Click “Next” to install LiteSpeed
For LiteSpeed License Choose Web Host Professional
Build matching PHP binary
There is a pre-built PHP 4 binary coming with LSWS, however, you should build your own PHP binary using matching configuration options used by Apache mod_php.
If LiteSpeed is running, you should switch back to Apache temporarily by clicking “switch to Apache” link. Then, click “Build Matching PHP binary” link. It is going take a while.
Click “Restart LiteSpeed”.
You can now verify if everything is working as expected. It should be!
You can now replace Apache with LiteSpeed Web Server. Click “Change Port Offset” and set the value to 0 if you had not done so previously. Click “Switch to LiteSpeed” and that’s it!
WARNING: Do NOT uncheck the “Apache Web Server” (httpd) service under WHM’s service manager. If you do this WHM will not restart LiteSpeed automatically when configuration changes have been made.
If you want to Install Imunify 360 run below command
Getting started with Imunify360
- $ wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh
- $ bash i360deploy.sh
Installing Softaculous in cPanel
- wget -N http://files.softaculous.com/install.sh
- chmod 755 install.sh
Install system backuplike package cpanel
So now how to mount a disk to cPanel perfectly.
Steps to Mount a disk as /home2 for cPanel servers
Mount a disk as /home2 for cPanel servers
1) To see the free disk available on the server
[root@server2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 120G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 118.8G 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 7.6G 0 lvm [SWAP]
└─centos-home 253:2 0 61.2G 0 lvm /home
sdb 8:16 0 1000G 0 disk
loop0 7:0 0 2.2G 0 loop /home/virtfs/apollos/var/tmp
2) Use the command fdisk to confirm > fdisk -l
3) Create a directory mkdir /home2
4) make the partition on /dev/sdb by executing
and then use following in the prompt
>“n” for new partition
> “p” for primary partition
> “1” for the first partition
> “Enter” / “Enter” for the first AND last cylinders (automatically use the entire disk)
> “w” to save what you have done
5)Next step is to format the parted disk.
6) Mount formate partition
mount /dev/sdb1 /home2
7) If you want the partition to auto mount on server (re)boot edit fstab file located at /etc/fstab and add one of following lines at the bottom
/dev/sdb1 /home2 ext3 defaults 0 0
(if you’re not sure how to add fstab entry, then use /etc/mtab entries as a reference )
Mount the file system by using the command
Mount -a or mount
Login to WHM
9) Basic WebHost Manager® Setup >> set /home2 directory instead of /home
Can you please try to run fixquotas cPanel script as below
Install MySQL Governor step by step
If you are running MySQL Server
Remove previous packages if installed
yum remove db-governor db-governor-mysql
Install the governor-mysql package
yum install governor-mysql -y
Now run this python script to complete the installation
If you are running MariaDB, use this commands instead
yum install governor-mysql
On the next command, make sure you replace “mariadbXX” with the correct MariaDB version you are running (55 for MariaDB v5.5, 100 for MariaDB v10.0 and 101 for MariaDB v10.1)
That’s all, now your CloudLinux system also uses MySQL governor to monitor and limit your MySQL script abusers.
MySQL Governor configuration
MySQL Governor configuration can be found at this location:
However, before editing its configuration manually we suggest you to use the official dbctl utility. Once you are satisfied with the governor configuration, you must restart the system service in order to apply the changes:
service db_governor restart
Easy Apache PHP Extension must need to start your WHM/cPanel
Easy apache PHP Extension:
Below extension need for whmcs installation if you have
|Curl with SSL|
GD2 Image Library
Give comments if my articles are helpful for you.