How to install cPanel on a VPS running CentOS 6

Prior to cPanel installation, it’s essential to take two additional steps –

  1. Ensure that you have Perl installed on the server –

sudo yum install perl

  1. Next, you need to check that the server on which cPanel is installed has a Fully Qualified Domain Name. So you need to give a valid hostname to the server. If you avoid this step you will surely get the error as below –

2016-11-03 16:00:54 261 (ERROR): Your hostname () is not set properly.
Please 2016-11-03 16:00:54  262 (ERROR): change your hostname to a fully qualified domain name,
2016-11-03 16:00:54  263 (ERROR): and re-run this installer.

But this error has a simple solution. If there’s FQDN, you can type it in with the command below –

hostname your FQDN

Or if you want to proceed with the cPanel installation skipping the above step and also still don’t have the hostname, a temporary one will do. After the cPanel is installed, you can change the hostname to correct one on one of the pages of the first setup.


Steps for cPanel Installation –

  1. Install screen and wget –

sudo yum install screen wget

  1. After the installation of the screen, start a new session running:


  1. After the screen opens, proceed to install cPanel with WHM or a DNS only version of cPanel. Use the below command to install cPanel with WHM:

wget -N

  1. To install the DNS only version of cPanel run the command –

wget -N

  1. Go ahead and start the script as below, with the requested package downloaded –

sh latest

  1. Close out of the screen as the script will continue running till one to two hours in the background.

For detaching screen type:


For reattaching to your screen use the command:

screen -r

  1. Once cPanel is installed finally, you can access the login by going to your IP address:2087 (eg. or domain (

Your login will be:

username: your_server_user

password: your_password

Once you login successfully, it’s finally done! Now login in at ipaddress/cpanel or domain/cpanel.

  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution