Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

How To Install cPanel on CentOS 6 and 7

Sobi1

Loyal member
Joined
Mar 20, 2011
Messages
1,323
Credits
0
About cPanel
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.

Notes
  • Once cPanel is installed, it cannot be removed from the server without a complete server restore. cPanel does not offer an uninstaller
  • Additionally, cPanel is subject to a licensing fee which may come out to be around $200 a year. You can find out more about cPanel pricing here

Setup
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:

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

Install cPanel
sudo yum install screen wget

Once screen is installed, start a new session running:
After opening screen, you can proceed to install cPanel with WHM or a DNS only version of cPanel.

With the requested package downloaded, we can go ahead and start the script running:

sh latest
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
 
Advertisement Placeholder

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Who read this thread (Total readers: 0)
No registered users viewing this thread.

New Threads

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 9 27.3%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 24 72.7%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds