How To Install cPanel on a Virtual Server Running Centos 6

About cPanel

cPanel is a useful application which aids users to manage servers via a GUI interface rather than through the conventional command line. Though cPanel installation is quite simple, the script takes  a number of hours in running.


  • If installation of cPanel is done, then it is not possible to remove it from the server without full server restore. No uninstaller is offered alongwith cPanel.
  • Furthermore, cPanel is liable to be subjected to a licensing fee.

Setting up

Prior to installation of cPanel on the droplet, two more steps need to be taken:

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

sudo yum install perl

Following installation of perl, an additional preliminary step needs to be taken. cPanel is quite choosy in ensuring that server on which it has been deployed possess a Fully Qualified Domain Name. 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, in case you intend to go forward with the deployment of cPanel but do not have the hostname, then you provide a temporary one. 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

Though there are only a few steps in the installation of cPanel, the installation itself 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. It is especially useful in cases of intermittent internet issues or in case you may need to pause the tedious installation process.

First of all, move ahead and deploy screen:

sudo yum install screen

On screen installation, start a new running session:


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

  • The command given below can be utilized for installing cPanel through WHM:
    wget -N
  • The command given below can be utilized for installing the DNS only version of cPanel:
    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

The following command can be used for reattaching 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 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 28 articles

Leave a Reply