Thursday, February 28, 2013

How to Install cPanel/WHM on CentOS VPS

cPanel/WHM installation on your VPS or dedicated server is very easy. Just follow the steps below & you are done. Remember that you need fresh CentOS installation prior to installing cPanel/WHM.

1. Run your preferred SSH client such PuTTY. Connect to your server & login as “root”.
2. Download & install cPanel/WHM by running the following commands one by one.

Installing Perl

First we need to install Perl so the cPanel installation can run.  We will install the version of Perl that is currently available on the YUM software repositories by using the following command.   It is assumed that you are running this command as a non-root user with sudo permissions.
This command downloads and installs Perl from the YUM repository:

# cd ~
# sudo yum install perl

Downloading cPanel Installation Files

Now you need to download the cPanel installation script. This small file will connect to the cPanel site and download the latest version of their software.
Use the following command to download the script:

# wget

cPanel Installation

How to Install mod_cloudflare on a cPanel Server

There are many advantages of using Cloudflare, mainly to increase website performance (CDN) and security.

However, when using Cloudflare, all hits to your website will come from Cloudflare IP addresses. In order to obtain visitors’ actual IP address, you must install mod_cloudflare.

Installing mod_cloudflare on a cPanel server is very easy. Just follow 6 steps as below. Please be reminded that this is only applicable if you are using Apache webserver.

1. Connect to your server through SSH and log in as root.
2. Change directory to /usr/local/src

cd /usr/local/src
3. Obtain mod_cloudflare source code

Force LiteSpeed to Update to Latest Version on cPanel/WHM Server

Sometimes you find out that LiteSpeed won’t update to the latest version automatically. The worst is you can’t see the option to update to the latest version, although LiteSpeed has released a new version.
This happened to me when I’m using LiteSpeed version 4.1.3. LiteSpeed version 4.2 was released for about a montha but yes I can’t update it.
If you’re facing similar situation, you can update to the latest version, simply issue the following command in SSH as root.

/usr/local/lsws/admin/misc/ -f -v 4.2
Replace 4.2 to latest version that is currently available.