Archive for February 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 .




 Concurrent Connections:

 Number of Cores Per LVE*:
 *requires server reboot for existing LVEs

And through above  options CloudLinux isolates each user so that no matter what, the user can never exceed the resources allocated to him.


Cloud Linux Installation ::

Cloud Linux installation is simple and a  cPanel  server must meet the below requirements ::


    LVE installed
    Apache 2.2.x or 1.3.x, compiled with easyapache
    mod_suexec should be enabled
    Apache should be configured with MPM Prefork, Worker or Event
    wget and yum should be installed

Below are the few simple steps to complete  the installation ::


[email protected][#] wget
[email protected][#] sh cpanel2cl -k <activation_key>
[email protected][#] reboot
[email protected][#]  /scripts/easyapache --build
[email protected][#] yum install cpanel-lve -y
[email protected][#]  yum install cpanel-lvemanager -y
[email protected][#] yum install lve-cpanel-plugin -y

Installing and Configuring mod_hostinglimits if not already loaded with  default installation


[email protected][#] cd /usr/local/src
[email protected][#] wget
[email protected][#] tar -zxvf mod_hostinglimits.tar.gz
[email protected][#] cd mod_hostinglimits
[email protected][#] cmake CMakeLists.txt
[email protected][#]  make install
And then add  the below line in  the httpd.conf to load the mod_hostinglimits module in Apache
 LoadModule hostinglimits_module modules/

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


[email protected][#] yum upgrade -y 

2 > Recompile Apache and prevent linking to liblve


[email protected][#] /scripts/easyapache --build 

3 >  Re-install your Non-CloudLinux Kernel


[email protected][#] yum --disableexcludes=all install kernel

4 >  Remove CloudLinux Kernel


[email protected][#] rpm -qa |awk '/^kernel.*lve/ {print $1|"xargs yum -y erase"}'

5 > Reinstall any CloudLinux-provided RPMs that are also provided by CentOS


[email protected][#] rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum reinstall -y"}'

6 > Downgrade any CloudLinux provided RPMs to the CentOS version


[email protected][#] 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


[email protected][#] yum upgrade -y

9 > Reboot the server to use the new non-CloudLinux kernel


[email protected][#] reboot


That’s all.

Git Installation on Linux

If you want to  install git on your linux server then follow the below simple steps for the installation ::


[email protected][#] cd  /usr/local/src/
[email protected][#] wget
[email protected][#] tar -zxf git-latest.tar.gz
[email protected][#] cd   git-*
[email protected][#] autoconf
[email protected][#] ./configure --with-curl=/usr/local
[email protected][#]make
[email protected][#] make install

That’s all.

How to list all domains under a client in plesk

If you want to find out all the domains under a client in plesk then you can retrieve that information using below 2 simple  mysql queries  ::


[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select  id from  clients where login='clientname'";

The above command will  return  the cl_id (Client ID) and using the cl_id you can get the list of domains.


[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select name from domains where cl_id='6'";

That’s all, easy isn’t it.