Thursday, March 26, 2026

Linux | Install cPanel/WHM on Rocky Linux 10

 Linux | Install cPanel/WHM on Rocky Linux 10

Following the end of CentOS 8 on December 31, 2021, the hosting industry needed a stable replacement for cPanel deployments. Key points include:

- Rocky Linux Emergence: Created as a 1:1 binary-compatible RHEL derivative, it fills the void left by CentOS 8 as a stable, free, and community-driven OS.

- The Problem with CentOS Stream: cPanel officially declined support for CentOS Stream, forcing administrators to find a more predictable "Fixed Release" OS.

- The Modern Choice: Rocky Linux has become a premier choice for cPanel installations due to its reliability, strong financial backing, and seamless compatibility with RHEL-based software.

Prerequisites:
- Linux VPS with Rocky Linux operating system
- 1 GB of RAM
- 20 GB of storage space
- Static IPv4
- 1 core CPU 1.1 GHz
- Connecting to Linux VPS through SSH (You can connect to Linux VPS using the Putty program)
- Having a user account with Root/Sudo privileges

Installing cPanel on Rocky Linux has simple steps, by following the steps that we will teach later, you can manage your web server and hosting services efficiently with cPanel facilities.

Step 1. Updating Rocky Linux server repository packages

Before installing any program, we recommend updating the Rocky Linux server resources and repositories by running the following command:

yum update -y

If you are asked to confirm the update process, type Y and press Enter.

Step 2. Installing Perl

cPanel is written based on the Perl programming language, so installing Perl on a Rocky Linux server is a prerequisite for installing cPanel on Rocky Linux. To install Perl on Rocky Linux, run the following command:

yum install perl

Step 3. Installing Curl

If Curl is not installed, the required cPanel installer script will not be installed, so install Curl using the following command:

yum install curl

Step 4. Adding hostnames

To use cPanel, you must enter the hostname in Fully Qualified Domain Name (FQDN) format. So enter the following command:

hostnamectl set-hostname myserver.mydomain.com

Note: In the Mydomain and Myserver fields, replace the hostname and domain you want.

Step 5. Disabling Network Manager Service

Cpanel is incompatible with Network Manager Service, which is implemented to manage the connection of computers, so to install cPanel, you need to ensure that Network Manager Service is disabled:

service NetworkManager stop

chkconfig NetworkManager off

Step 6. disabling SELinux and firewall Temporarily

SELinux is a Linux kernel security module that supports access control security policies through a mechanism. Therefore, to avoid problems and incompatibility, it is recommended to temporarily disable SELinux before installing cPanel:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

The second way to disable SELinux is to edit the SELinux configuration file using any text editor (preferably VI). To do this, change the content of the SELinux configuration file by running the following command and using a text editor:

vi /etc/selinux/config

Then by pressing the I and C buttons, add the desired codes in the content of the SELinux configuration file and change the SELINUX parameter from Enforcing to disabled:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted – Targeted processes are protected,
# minimum – Modification of targeted policy. Only selected processes are protected.
# mls – Multi Level Security protection.
SELINUXTYPE=targeted

Then save the SELinux configuration file by pressing the Esc button and typing wq to apply the changes.

In addition to disabling SELinux, to avoid problems when installing cPanel, it is better to temporarily disable the firewall and use a third-party firewall. To temporarily disable the firewall in Rocky Linux, run the following command:

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

Step 7. Installing cPanel with a 15-day trial license

By using the command that we will provide below, you can use the features of cPanel with a trial license and do not need to buy a license.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

You may have to wait for approximately 1 hour to complete the installation process of WHM /cPane with a trial license. Of course, the waiting time depends on the speed of your network.

Step 8. Enabling Network Manager Service

After installing cPanel, re-enable Network Manager Service because computer connections require Network Manager Service. For this purpose, run the following command:

service NetworkManager start
chkconfig NetworkManager on

To apply your changes, reboot the Rocky Linux server using the following command:

reboot

After restarting the Rocky Linux server, enter the cPanel management panel by using a browser and typing the address https://serverIP:xxxx.

It should be noted that you must replace your IP address in the login address of the cPanel management panel.

Then type your server password for the cPanel login password and Root username for the cPanel login username.

Step 9. License activation for Cpanel/WHM

You have two ways to enable the license for cPanel: 1. Using a free trial license 2. Buying a paid license.

Free trial license activation for Cpanel/WHM

cPanel 15-day free license activation requires configuration, so log into your cPanel Store account.

Note: If you do not have a cPanel Store account, you must register.

- Log in to the cPanel management panel.
- Log in to your account.
- Type your server username and password to enter the WHM panel.
- After reading the conditions, accept them.


- You will be faced with a cPanel Store account login page. If you already have an account, you can log in by entering your username and password. Otherwise, this is where you can create a cPanel Store account. Assuming you do not have an account, continue the steps to create an account and select the log in option.


- In the window that opens, select the Create Account option to create a cPanel Store user account.


- Enter your email address, after agreeing to the terms of use of cPanel, select the Create Account option.


- To specify the password for the cPanel account, you will receive an email in the email inbox you set for WHM.
- Select the ALLOW ACCESS option to link your server’s IP address to the email address you have specified.


If you create a user account in the browser you configured WHM and enter your email account, the previous step is applicable, but if you do not use the same browser to enter the email, you can specify a password by clicking on the link you received.

- Enter the code that was sent to your email.


- Displaying the following page and the phrase 15-day free Trial License Activated informs about the activation of the cPanel trial license. Then go to the settings section.


- To be notified of possible WHM errors, enter an email address.

- To connect your domain or subdomains to the WHM server, type the name servers.



- Enter these as child name servers in your domain control panel.

Finally, you have successfully activated your free trial license for cPanel.

After installing WHM and the necessary configurations, reboot the server to apply your settings.


Activation and purchase of a paid license

To order a cPanel license, visit the Opera VPS licenses page.

Then confirm the activation of the license, from the cPanel License Verification site.

Update the desired license by running the following command on the Rocky Linux server:

Closure:

The combination of cPanel/WHM and Rocky Linux provides a high-performance, enterprise-grade environment for managing hosting services. By following this guide, users gain a stable platform to handle websites, emails, and databases with ease.

Key Takeaways:

- Stability: Rocky Linux serves as a robust, RHEL-compatible foundation, ensuring long-term reliability for hosting.

- Efficiency: cPanel’s automated tools simplify complex server management tasks, making them accessible even to beginners.

- Security: The setup allows for granular control over security settings and unauthorized access prevention.