A Guide to Install cPanel on a Virtual Server Running CentOS


Paul Lopez

cPanel is an appropriate application that enables server administration easily through a GUI interface rather than traditionally doing it via command line. Installation of cPanel seems quite simple but the script takes hours to run.

Here’s the setup guide for cPanel installation on a Virtual Server running CentOS 6 –

But prior to installing cPanel you need to ensure that Perl is installed on your server. Below is the code for this –
sudo yum install perl

The next step would be providing a valid hostname to the server i.e. Fully Qualified Domain Name (FQDN). IF you have a FQDN, type the below command –
hostname your FQDN

Otherwise, if you want to proceed to installation of CPanel but don’t have a host name, a temporary one can be inserted. After the cPanel is installed, you can change the hostname to correct one on any of the first setup pages.
hostname  host.example.com

cPanel Installation –
Installation of cPanel doesn’t actually require use of program “screen” but it can be quite helpful for the installation process. With the use of program “screen”, it would be possible for you to pause the length install process or even when you have internet issue.

So, let’s install screen and wget:
sudo yum install screen wget

You can start a new session running after the screen installation is complete, as below:

Now you can proceed to install cPanel with WHM or a DNS only version of cPanel. Use the below command to install cPAnel with WHM:
wget -N http://httpupdate.cPanel.net/latest

You can install DNs only version of cPanel with this command:
wget -N http://httpupdate.cPanel.net/latest-dnsonly

Now you can move ahead and start running the script:
sh latest

Now come out of the screen. The script will keep running in the background even if you are out of the server.

You can detach the screen type with this command:

And if you need to re-attach your screen use this command:
screen –r
After the complete installation of cPanel, you can access the login via your domain or ip address.

Your login will be as below:
username: your_server_user
password: your_password

From here you can create your cpanel user and finally login at domain/cpanel or ipaddress/cpanel.

Staff online

Members online

Latest posts