How To Install cPanel WHM on Rocky Linux 8

In this guide, you will learn to Install cPanel WHM on Rocky Linux 8.

cPanel is one of the most popular control panels in the United States. Many web hosting companies supply cPanel to customers as part of their hosting package.

cPanel has two interfaces, a user interface called cPanel and a server management interface called Web Host Manager (WHM). This combination allows users to manage their websites and supplies hosting providers with tools to manage the server.

Steps To Install cPanel WHM on Rocky Linux 8

To complete this guide, you must log in to your server as a root or non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Rocky Linux 8.

Disable Rocky Linux 8 Firewall

First, you need to update your local package index with the following command:

dnf update -y

Then, you must disable the Rocky Linux OS firewall using the following commands:

iptables-save > ~/firewall.rules
systemctl stop firewalld
systemctl disable firewalld

Disable SELinux on Rocky Linux 8

To make your system compatible with the cPanel installation, you must disable SELinux. To do this, open the SELinux config file with your desired text editor, here we use vi:

vi /etc/selinux/config

Find the SELinux line and set it to disabled as shown below:


When you are done, save and close the file.

Then, use the following command to install the required packages and dependencies on Rocky Linux 8:

dnf install perl curl -y

Set up FDQN on Rocky Linux 8

Next, you must add a hostname that should be in (FQDNFully Qualified Domain Name format. You can set your hostname with the following command:

hostnamectl set-hostname cpanel.rocky

Note: Remember to use your own hostname.

When you are done with these requirements you can continue to install cPanel on your server.

Install cPanel WHM on Rocky Linux 8

At this point, we use this script to download and install the cPanel with a trial license:

cd /home && curl -o latest -L && sh latest

Note: If you get an error that could not resolve the host, Check if the server has internet. For example:


If you don’t have a connection, edit the /etc/resolv.conf and add the following line to your file:


When you are done, save and close the file. Then, run the script again and it works.

cd /home && curl -o latest -L && sh latest

This will take some time to complete. Be patient!

Enable network Manager on Rocky Linux 8

When your cPanel installation is completed on Rocky Linux 8, enable the Network Manager service with the commands below:

service NetworkManager start
chkconfig NetworkManager on

Note: It is not essential to reboot the server, but you can still restart all installed services through the below command:


At this point, you can log in to your WHM.

Access cPanel WHM Web Interface Rocky Linux 8

To access the WHM login screen, type your server’s IP address in your web browser followed by 2087:


In the WHM login screen, you should enter your Rocky Linux root user and password and click login to access data for cPanel.

WHM login screen

Then, read cPanel terms and conditions and click Agree to All.

cPanel terms and conditions

As you can see, it asks to login into your cPanel Store account, which we will create now, so choose login to continue.

free cPanel trial

In this step, there are 2 options that we can choose from. To log in to your cPanel Store account if you have one, or to sign up for it.

Click create an account if you don’t have one.

Create cPanel account

Enter your email address, agree to cPanel terms of use, and click to create an account.

Consider that if you are logged in to your email in the same browser that you are configuring the WHM and creating the account, you will be asked to allow access to the IP of your server to be connected to the email address you entered.

To do so, choose to allow access.

Note: Otherwise, if you are not logged in to your email in the same browser, you should click on the link you will receive to set a password for your account. Then you can go one step back and try to log in.

In this step, you will receive a code that you should enter.

This page shows that your trial license activation was successful. So you can continue to the server setup section.

Activate cPanel trial license

In the next section, you should enter an email address to receive probable error notifications from WHM.

Then you should enter 2 name servers. Name servers are used to connect your domain or subdomain to your WHM server.

Note: You should also create these as child name servers in your domain control panel too.

When you are finished, you will see your WHM dashboard on Rocky Linux 8.

WHM dashboard on Rocky Linux 8

From WHM you can easily perform your tasks.


At this point, you have learned to Install cPanel WHM on Rocky Linux 8.

Hope you enjoy it.

You may be like these articles:

How To Set up cPanel and WHM on Centos 7

How To Install ClamAV on DirectAdmin

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

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

Stay informed and not overwhelmed, subscribe now!