How To Install cPanel on a Virtual Server Running Centos 6

About cPanel

cPanel is a used  to manage servers via a GUI interface rather than through the conventional command line. Though cPanel installation is quite simple, the script does takes  a number of hours while running.


  • Once cPanel is installed  it is not possible to remove it from the server without full server restore. it does not have feature to uninstall cPanel.
  • Furthermore, cPanel is liable to be subjected to a licensing fee.

Setting up

Two carefull steps needs to be taken before installing  cPanel on the droplet

First of all, we should ensure that Perl is deployed on the server

sudo yum install perl

After installation of perl, an additional preliminary step needs to be taken.

cPanel ensures the need of the  Fully Qualified Domain Name in the server. So we will provide a valid hostname to it. If you skip this step then you’ll get this very general error as shown below:

2012-11-01 16:00:54  461 (ERROR): Your hostname () is not set properly. Please
2012-11-01 16:00:54  462 (ERROR): change your hostname to a fully qualified domain name,
2012-11-01 16:00:54  463 (ERROR): and re-run this installer.

However, the solution to this problem is very easy. In case you possess a FQDN, then you can enter it with the following command:

hostname your FQDN

Alternatively,  you can provide a temporary hostname in case you don’t have FQDN  for deplyoing cPanel. On completion of installation of cPanel, on the first setup pages itself, you would be able to modify the hostname to the permanent one.


Installation of cPanel

Although installation of cPanel is just few steps away, it does takes quite a long time. Though utilization of program “screen” is not mandatory for installing cPanel, but it can help a lot during the installation process. where intermittent internet issues is major cause or in case you  need to pause the tedious installation process.

First of all, install screen with command as follow:

sudo yum install screen

On screen installation, start a new running session:


Following opening the screen, you can start installing cPanel with a DNS only cPanel version or WHM.

  • To install cPanel  through WHM:
    wget -N
  • The install cPanel with the DNS only version:
    wget -N

On downloading of the requested packaged, we can move forward and begin the script running:

sh latest

Now close out of the screen. The script will continue to run in the backdrop even on closing out of the server as it may require one to two hours in completing.

For detaching screen type: Cntrl-a-d

to reattach  to your screen:

screen -r

On final installation of cPanel, login can be accessed by visiting your domain (for or IP address:2087 (like

The login credentials  will be as follows:

username: your_server_user
password: your_password

You can create cPanel user from here and thus login in at domain/cpanel or ipaddress/cpanel.

KB Admin has written 46 articles