This article covers a version of CentOS that is no longer supported. If you are currently operating a server running CentOS 6, we highly recommend upgrading or migrating to a supported version of CentOS.
Reason: CentOS 6 reached end of life (EOL) on November 30th, 2020 and no longer receives security patches or updates. For this reason, this guide is no longer maintained.
See Instead:
This guide might still be useful as a reference, but may not work on other CentOS releases. If available, we strongly recommend using a guide written for the version of CentOS you are using.
cPanel is a convenient application that allows users to administer servers through a GUI interface instead of the traditional command line. Although the installation for cPanel is relatively simple, the script does take several hours to run.
Before installing cPanel on our droplet, we need to take two additional steps.
First we need to make sure that Perl is installed on the server
sudo yum install perl
After installing perl we need to take one more preliminary step. cPanel is very picky about making sure that server that it is installed on has a Fully Qualified Domain Name. To that effect, we need to provide it with a valid hostname. Skipping this step will inevitably get you the following, very common, error.
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.
Luckily this error has a very easy solution. If you have a FQDN, you can type it in with the command:
hostname your FQDN
Otherwise, if you want to proceed with the cPanel installation but do still lack the hostname, you can input a temporary one. Once cPanel is installed, you will be able to change the hostname to the correct one on one of the first setup pages.
hostname host.example.com
Although the cPanel installation only has several steps, the installation does take a long time. Although using program "screen" is not necessary in order to install cPanel, it can be a very helpful addition to the installation process. It can be especially useful if you know that you may have issues with intermittent internet or that you will need to pause the lengthy install process.
To start off, go ahead and install screen and wget:
sudo yum install screen wget
Once screen is installed, start a new session running:
screen
After opening screen, you can proceed to install cPanel with WHM or a DNS only version of cPanel.
wget -N http://httpupdate.cPanel.net/latest
wget -N http://httpupdate.cPanel.net/latest-dnsonly
With the requested package downloaded, we can go ahead and start the script running:
sh latest
Then close out of screen. The script, which may take one to two hours to complete will continue running while in the background—even if you close out the of server.
In order to detach screen type: Cntrl-a-d
To reattach to your screen you can use the command:
screen -r
Once cPanel finally installs, you can access the login by going to your ip address:2087 (eg. 12.34.45.678:2087l) or domain (example.com:2087)
Your login will be:
username: your_server_user password: your_password
From there, you can create your cpanel user and finally login in at ipaddress/cpanel or domain/cpanel
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
It has been updated
I think I figured it out… If you installed the WHM version, you will need to go to yourdomain.com:2087 This is different than what is instructed above which tell you to go to yourdomain.com/cpanel (which is the same as yourdomain.com:2083). If you try using the port 2087 you will be able to login with your servers username/password such as the one provided by DigitalOcean.
How do I login if I set up SSH key pair authentication rather than a password?
I have followed all steps. and all done now I’m opening whm but its showing this webpage is not available. may be i did something wrong. 104.131.56.92:2087 when i open this it will drap to new page which is https://host.example.com:2087/
can you please tell me solution ti fix this…
I have installed cpanel with whm. i have provide dummy hostname as per instruction and now <ip-address>:2087 redirects to <dummy-domain>:2087 and its server not found
Please help me out of this
Does cPanel mail work properly with this? We have several clients on WHM that have mail. I know with another cloud hosting provider I had to get the mail ports unblocked.
Also if you type your ip without the https:// it won’t work.
Eg. 123.45.6.123:2087 wont work.
Must use https://123.45.6.123:2087
Hi, excuse me. Nobody answered a previous question about email usage, or I didn’t see the answer… I want to install WHM to run several cpanel accounts but it’s important to know if I can configure and use emails normally with webmail? Thanks.
How would I go about getting a license? I really want to implement them on my 3 blogs, the 2 health ones in particular, http://healthbitesonline.com and http://kidneystoneremoval.com along with cpanel
is there any complete tutorial, teaching besides installing config too? I think this is missing from host companies.