Pages

Tuesday 23 October 2012

cPanel CloudLinux Installation/Uninstallation

Cloud Linux greatly increases the stability of a shared hosting environment through it’s resource limit feature that prevents sudden resource spikes from taking down the entire server.
By using CloudLinux you can define the max CPU, Memory, Concurrent Connections and Number of Cores Per LVE .

Cloud Linux Installation ::

Below are the few simple steps to complete the installation ::
root@server[#] wget http://repo.cloudlinux.com/cloudlinux/sources/cln/cpanel2cl

root@server[#] sh cpanel2cl -k <activation_key>


root@server[#] reboot


root@server[#] /scripts/easyapache --build


root@server[#] yum install cpanel-lve -y


root@server[#] yum install cpanel-lvemanager -y


root@server[#] yum install lve-cpanel-plugin -y


Installing and Configuring mod_hostinglimits if not already loaded with default installation

root@server[#] wget http://repo.cloudlinux.com/cloudlinux/sources/mod_hostinglimits.tar.gz

root@server[#] tar -zxvf mod_hostinglimits.tar.gz


root@server[#] cd mod_hostinglimits


root@server[#] cmake CMakeLists.txt


root@server[#] make install


And then add the below line in the httpd.conf to load the mod_hostinglimits module in Apache

LoadModule hostinglimits_module modules/mod_hostinglimits.so

Cloud Linux Uninstallation ::


Follow the below steps to uninstall CloudLinux safely ::

Before proceeding to un-installation of CloudLinux , check if your server has CloudLinux installed

/usr/local/cpanel/bin/cloudlinux_system_install -c

1 > Update your CentOS-provided RPMs
root@server[#] yum upgrade -y

2 > Recompile Apache and prevent linking to liblve
root@server[#] /scripts/easyapache --build

3 > Re-install your Non-CloudLinux Kernel
root@server[#] yum --disableexcludes=all install kernel

4 > Remove CloudLinux Kernel
root@server[#] rpm -qa |awk '/^kernel.*lve/ {print $1|"xargs yum -y erase"}'

5 > Reinstall any CloudLinux-provided RPMs that are also provided by CentOS
root@server[#] rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum reinstall -y"}'

6 > Downgrade any CloudLinux provided RPMs to the CentOS version
root@server[#] rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum downgrade -y"}'

7 > Remove any remaining CloudLinux specific RPMs
rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum erase -y"}'

8 > Upgrade any downgraded CentOS provided RPMs
root@server[#] yum upgrade -y

9 > Reboot the server to use the new non-CloudLinux kernel
root@server[#] reboot