Uninstall CloudLinux :: cPanel server

CloudLinux is a good tool however we had some issues with our test production server and had to remove it. Here are the steps to remove CloudLinux :

CloudLinux Kb has below steps :
https://helpdesk.cloudlinux.com/index.php?/Knowledgebase/Article/View/33/0/how-do-i-convert-back-to-centos

yum remove liblve-devel
cd /usr/local/src/
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/centos2cl
sh centos2cl -c

After executing script from CloudLinux, you need to remove the CL kernels as provided in the output of the script.

eg : (This may be different so watch the output of “sh centos2cl -c”)
rpm -e --nodeps kernel-2.6.32-379.5.1.lve1.1.9.6.1.el6.x86_64 kernel-headers-2.6.32-379.5.1.lve1.1.9.6.1.el6.x86_64 kernel-2.6.32-379.9.1.lve1.1.9.7.1.el6.x86_64 kernel-firmware-2.6.32-379.9.1.lve1.1.9.7.2.el6.noarch kernel-2.6.32-379.9.1.lve1.1.9.7.2.el6.x86_64

Once done install the CentOs kernel :

yum install kernel kernel-headers
yum update

Make sure grub entries are fine and reboot.

Once the server is back execute below command to cleanup CL :

yum remove lve liblve lve-utils lve-stats

Finally run easyapache to rebuild :

/scripts/easyapache --build

You should be fine / free from CloudLinux 🙂

CloudLinux Uninstall : Easyapache error : configure: error: C preprocessor “/lib/cpp” fails sanity check

I was testing CloudLinux on a production server however it turned out bad and had to remove it. After removing the kernel and reboot, last step was to run easyapache which gave errors as below :

==========
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/cpeasyapache/src/httpd-2.2.23/srclib/apr':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
configure failed for srclib/apr
==========

Further checking i found that the kernel-headers package was missing which was installed using command :

=============
yum install kernel-headers-$(uname -r)
=============

After installing kernel headers easyapache executed fine and the server was free from CloudLinux. 🙂