In this blog post, we’ll guide you through the process of installing WHM/cPanel on AlmaLinux 8, a robust, open-source RHEL fork designed for enterprise environments.

Prerequisites

Before we begin, ensure you have the following:

  1. A fresh installation of AlmaLinux 8.
  2. Root or sudo access to the server.
  3. A valid cPanel license.
  4. A minimum of 2GB RAM and 20GB disk space (though more is recommended for optimal performance).

Step-by-Step Installation Guide

Step 1: Update Your System

First, update your system to the latest packages to ensure compatibility and security.

sudo dnf update -y

Step 2: Set the Hostname

Set a fully qualified domain name (FQDN) for your server. This is necessary for cPanel to function correctly.

sudo hostnamectl set-hostname yourdomain.com

Verify the hostname:

hostnamectl

Step 3: Disable Network Manager (if applicable)

Network Manager can sometimes conflict with cPanel. Disable it to avoid potential issues.

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

Step 4: Install Perl

cPanel requires Perl to run. Install it using the following command:

sudo dnf install perl -y

Step 5: Download and Run the cPanel Installer

Navigate to the home directory and download the latest cPanel installation script.

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

Run the installation script. This process can take some time, depending on your server’s speed and internet connection.

sudo sh latest

Step 6: Complete the Installation

Once the installation is complete, you can access WHM to complete the setup.

  1. Open a web browser and navigate to https://yourserverIP:2087.
  2. Log in using the root user credentials.
  3. Follow the on-screen instructions to configure WHM. You will need to enter your cPanel license key during this setup.

Step 7: Configure Basic Settings in WHM

After logging into WHM for the first time, you’ll want to configure some basic settings:

  1. Server Configuration: Set your contact information and configure basic server settings.
  2. Setup Networking: Verify your server’s hostname, resolvers, and IP addresses.
  3. Setup Server: Configure the nameservers, FTP services, and other options according to your needs.
  4. Security Center: Set up security measures such as a firewall, SSH keys, and other recommended security settings.

Step 8: Create cPanel Accounts

Now that WHM is configured, you can start creating cPanel accounts for your domains.

  1. Navigate to Account Functions -> Create a New Account.
  2. Fill in the domain, username, password, and other required details.
  3. Click Create to finalize the new cPanel account.

Conclusion

Installing WHM/cPanel on AlmaLinux 8 is a straightforward process that greatly enhances your server management capabilities. By following these steps, you’ll have a powerful and user-friendly hosting environment ready to go. With WHM/cPanel, you can efficiently manage websites, domains, emails, and more, making it an excellent choice for both beginners and experienced server administrators.

Feel free to reach out if you encounter any issues during the installation or if you have any questions. Happy hosting!