How To Install cPanel On Centos 7


What Is cPanel?

cPanel is the industry leading paid control panel for hosting websites and applications. It is most often seen and used at shared hosting providers and is excellent for selling shared hosting. The software allows many normally complex command line actions to be done with the click of a button.

Initial Setup

Before we begin installing cPanel there is some software we should make sure that is installed. You can install it with the command:

yum install screen wget nano perl -y

Once the software has been installed we need to make sure the hostname for your server is set correctly. If it is not, cPanel will complain before the install starts. Run the command:


If you see something that is in the format similar to or you are good. If not, run the command:

hostname <>

This will set your hostname correctly.

Installing cPanel

The actual install process for cPanel is quite easy and much of it is automated. Before you begin the install please make sure that the server you are installing cPanel on is a fresh OS install with nothing else on it.

Because cPanel can take a while to install and configure itself, we are going to run the installer in the program screen. Screen allows a program to continue running even if we disconnect. To start screen run the command:


Now we need to navigate to the home directory and download the installer script:

cd /home
wget -N

To start the installer simply run:

sh latest

Now we wait. The installer can take anywhere from 20 minutes to an hour, depending on how fast your system is.

Once it is finished you will see something similar to:

2016-05-28 12:04:11  938 ( INFO): Congratulations! Your installation of cPanel & WHM 11.56 is now complete. The next step is to configure your server.

Configure Firewall

In Centos 7 a new firewall system is used by default called firewalld. Often times this firewall will block the ports that cPanel requires by default. To have cPanel open these ports run the command:


Login To cPanel

Now that cPanel is installed, you can login to WHM at: http://<your ip>:2086 .

You will be prompted for a username and password. For the user, use: root . Then for the password use the root password of your server.

The system will now walk you through some final configuration steps. Once you go through these, cPanel is fully installed.

CC BY 4.0 This work is licensed under a Creative Commons Attribution 4.0 International License.

Alex Wacker has written 16 articles

I am the founder and owner of Subnet Labs LLC. Impact VPS is one of our VPS brands. Linux, virtualizaton and the internet amaze me and I enjoy learning new things every day about them.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>