Install cPanel on a Virtual Server Running CentOS 6 with 7 Simple Steps

An easy application, cPanel enables monitoring of servers through a GUI interface instead of the command line. It’s a fact that the cPanel installation is moderately straightforward but the script takes only a few hours to run.

Extra Details About cPanel –

After the installation of cPanel, it’s not possible to expel from the server if it isn’t completely restored. There’s no uninstaller offered by cPanel.

Setup Steps –

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.

This entry was posted in Dedicated Website Hosting. Bookmark the permalink.