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.
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
server.example.com you are good. If not, run the command:
This will set your hostname correctly.
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 http://httpupdate.cPanel.net/latest
To start the installer simply run:
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.
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.
This work is licensed under a Creative Commons Attribution 4.0 International License.