Skip to main content

How to Install cPanelWHM in Rocky Linux

Cat

# How to Install cPanel/WHM on Rocky Linux

cPanel is a powerful web hosting control panel used to manage web servers and host websites. It allows users to control and manage various aspects of their hosting environment, including email, files, databases, domains, and security settings. cPanel provides a user-friendly interface, making it easier for users to manage their hosting services efficiently.

## Why Rocky Linux?

Rocky Linux is a stable, open-source, and free operating system developed based on RHEL. With the end of CentOS8's lifecycle, Rocky Linux emerged as a viable alternative, providing compatibility with CentOS8 and ensuring stability for server environments.

## 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
- SSH access to your Linux VPS
- User account with Root/Sudo privileges

## Installation Steps

### Step 1: Update Rocky Linux Packages

Update the Rocky Linux server repositories:

```bash
yum update -y

Step 2: Install Perl​

Install Perl, a prerequisite for cPanel:

yum install perl -y

Step 3: Install Curl​

Install Curl to download cPanel installation scripts:

yum install curl -y

Step 4: Set Hostname​

Set the hostname in Fully Qualified Domain Name (FQDN) format:

hostnamectl set-hostname myserver.mydomain.com

Replace myserver.mydomain.com with your desired hostname.

Step 5: Disable Network Manager Service​

Disable Network Manager Service, as it's incompatible with cPanel:

service NetworkManager stop
chkconfig NetworkManager off

Step 6: Disable SELinux and Firewall Temporarily​

Temporarily disable SELinux and the firewall:

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld

Step 7: Install cPanel with Trial License​

Download and install cPanel with a trial license:

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

Step 8: Enable Network Manager Service​

Re-enable Network Manager Service:

service NetworkManager start
chkconfig NetworkManager on

Step 9: Reboot the Server​

Reboot your Rocky Linux server for the changes to take effect:

reboot

After restarting the server, access the cPanel management panel via your browser using the server's IP address (https://serverIP:xxxx). Replace serverIP with your server's IP address. Login with your server's Root username and password.

Now, you've successfully installed cPanel/WHM on Rocky Linux!

Cat