How to Install cPanel/WHM on CentOS 7

How to Install cPanel WHM on CentOS 7

When setting up a new CentOS 7 server, you may find yourself looking for control panel software that will allow you to manage your websites and web applications in a graphical user interface. One of the most popular web hosting control panel solutions is cPanel/WHM. This software gives you a comprehensive control panel interface that allows you to manage and customize many different aspects of your server in a user-friendly environment. In this article, we will outline how to prepare your CentOS 7 server and install cPanel/WHM using the command-line interface. Before performing the steps in this guide, please ensure that you have set up root SSH access on your server.

Topics Include:

Install cPanel/WHM on your Bare Metal Hosting server today!

Prepare for Installation

Before you can install cPanel/WHM on CentOS, you will first need to disable your server’s firewall, the network manager, and SELinux.  

1. First, stop the service using the following command:

systemctl stop firewalld.service

2. Then, disable the server using the following command:

systemctl disable firewalld.service

3. After disabling the firewall, you will need to stop the NetworkManager service using the following command:

systemctl stop networkmanager

4. Once the service is stopped, you can disable NetworkManager using the following command:

systemctl disable networkmanager

5. Next, you will need to disable SELinux by editing the following file with the nano command:

nano /etc/selinux/config

With the file editor open, you can disable SELinux by changing the line that reads SELINUX=enabled to SELINUX=disabled

6. Next, you will need to install the programming language perl using the following command:

yum install perl -y

Once perl is installed, you can then proceed with the next steps to install cPanel/WHM on your server.

Install cPanel/WHM

1. Next, change directory into the /home/ folder with the following command:

cd /home

2. Next, download the latest release of cPanel/WHM using the following curl command:

curl -o latest -L https://securedownloads.cpanel.net/latest

3. Once the file has downloaded, you can run the installation script with the following command:

sh latest

After the process finishes, cPanel/WHM should now be installed on your system. 

Congratulations, you have successfully installed WHM/cPanel on CentOS 7!

AK
Alyssa Kordek Technical Writer

Alyssa started working for InMotion Hosting in 2015 as a member of the Technical Support team. Before being promoted to Technical Writer, Alyssa developed a skillset that includes data migration and system administration. She now works to produce quality technical content such as how-to guides that help users get the most out of their hosting experience.

More Articles by Alyssa

Was this article helpful? Let us know!