In this guide, we’ll walk through the steps to install WHM cPanel on Rocky Linux 8.

Prerequisites

Before starting, ensure you have:

  1. A clean installation of Rocky Linux 8.
  2. Root access to the server.
  3. A valid cPanel license.

Step 1: Update Your System

First, ensure your system is up-to-date. Open your terminal and run:

sudo dnf update -y

Step 2: Set the Hostname

Set a valid hostname for your server. This is crucial for the installation of cPanel/WHM:

sudo hostnamectl set-hostname your.hostname.com

Replace your.hostname.com with your actual domain name.

Step 3: Disable Network Manager

cPanel recommends disabling Network Manager to avoid potential conflicts:

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

Step 4: Install Perl

Perl is required for the cPanel installation script:

sudo dnf install perl -y

Step 5: Download and Run the cPanel Installation Script

Navigate to your home directory and download the latest cPanel installation script:

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

Run the installation script:

sudo sh latest

The installation process can take between 30 to 60 minutes depending on your server’s performance and internet speed. Sit back and relax while the script does its work.

Step 6: Access WHM

Once the installation is complete, you can access WHM by navigating to:

https://your.server.ip:2087

Replace your.server.ip with your server’s IP address. You’ll be greeted with a login screen. Use root as the username and your root password to log in.

Step 7: Initial Setup

Upon first login, you’ll need to complete the initial setup wizard:

  1. License Agreement: Agree to the cPanel & WHM End User License Agreement (EULA).
  2. Networking Setup: Configure your networking settings including your primary network interface and hostname.
  3. Nameservers: Set up your nameservers and resolver configuration.
  4. Services Configuration: Choose the services you want to run on your server like FTP, Mail, etc.
  5. Quotas: Enable disk quotas if required.

Step 8: Secure Your Server

Post-installation, it’s essential to secure your server:

  1. Firewall Configuration: Ensure your firewall is configured to allow necessary ports.
  2. SSH Access: Consider changing the default SSH port and disabling root login via SSH.
  3. CSF Installation: Consider installing ConfigServer Security & Firewall (CSF) for enhanced security.

Conclusion

Installing WHM cPanel on Rocky Linux 8 is a straightforward process if you follow the steps outlined above. With WHM cPanel, you’ll have a robust platform to manage your web hosting environment efficiently. Remember to keep your system updated and secure to ensure smooth operations.

For more detailed configurations and advanced settings, refer to the official cPanel documentation and support resources. Happy hosting!


Feel free to ask if you have any questions or need further assistance!