
How to Install cPanel & WHM on AlmaLinux 9: A Comprehensive Guide
AlmaLinux 9 has quickly become a top choice for server administrators seeking a stable, secure, and enterprise-grade operating system. When paired with the industry-leading power of cPanel & WHM, you get a robust platform for managing websites, emails, and hosting environments with unparalleled ease.
This guide provides a detailed, step-by-step walkthrough for installing cPanel & WHM on a fresh AlmaLinux 9 server. We’ll cover everything from initial prerequisites to the final installation command, ensuring a smooth and successful setup.
Before You Begin: Essential Prerequisites
Proper preparation is the key to a flawless installation. Before running the cPanel installer, you must ensure your server environment meets several critical requirements. Neglecting these steps can lead to installation failures or future instability.
- A Fresh Operating System: The installation must be performed on a minimal, clean installation of AlmaLinux 9. cPanel modifies many system configurations, and running it on a pre-configured server can cause significant conflicts.
- Static IP Address: Your server needs a valid, static IPv4 address. Dynamic IPs are not supported.
- A Fully Qualified Domain Name (FQDN): You must set a proper hostname for your server, such as
server.yourdomain.com. Simple hostnames likeserverare not sufficient. This FQDN should resolve to your server’s static IP address. - System Resources: Ensure your server meets the minimum system requirements. For optimal performance, cPanel recommends at least 2 GB of RAM and 40 GB of disk space.
- Root or Sudo Access: You will need root access or a user with
sudoprivileges to execute the installation commands. - Disable Conflicting Services: cPanel manages its own firewall and network settings. It’s crucial to disable any pre-existing firewalls before installation. You must disable firewalld and stop NetworkManager, as they can interfere with the setup process.
To disable firewalld, run the following commands:
systemctl stop firewalld
systemctl disable firewalld
The Installation Process: Step-by-Step Instructions
Once all prerequisites are met, you can proceed with the installation. The process is streamlined into a single, powerful script provided by cPanel.
Step 1: Ensure Your System is Up-to-Date
Always start by updating your system’s packages to their latest versions. This helps prevent potential conflicts and security vulnerabilities.
sudo dnf update -y
Step 2: Install Required Dependencies
The cPanel installation script requires curl to download the installer and perl to run it. While curl is often pre-installed, it’s good practice to ensure both are present.
sudo dnf install curl perl -y
Step 3: Set Your Server’s Hostname
If you haven’t already, set your server’s FQDN. Replace server.yourdomain.com with your actual hostname.
hostnamectl set-hostname server.yourdomain.com
Step 4: Download and Run the cPanel Installer
This is the final and most important step. The following command navigates to your home directory, downloads the latest installation script, and executes it.
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
The installation process will now begin. Be patient, as this can take anywhere from 30 to 60 minutes, depending on your server’s hardware and network speed. The script will automatically detect your operating system and install all necessary components for cPanel & WHM.
Once the installation is complete, you will see a confirmation message in your terminal. You will then need to reboot your server to finalize the setup.
reboot
Accessing and Securing Your New WHM Panel
After the server reboots, your cPanel & WHM installation is ready for its initial configuration.
You can now access the Web Host Manager (WHM) interface by navigating to https://your-server-ip:2087 in your web browser. Log in using your server’s root username and password.
During your first login, WHM will guide you through a brief setup wizard where you will:
- Agree to the cPanel & WHM End-User License Agreement.
- Enter your contact email address for server notifications.
- Configure the nameservers that will be used for domains hosted on your server.
Actionable Security Tip: One of the most critical post-installation steps is to configure a firewall. While you disabled firewalld for the installation, you must now secure your server. We highly recommend installing ConfigServer Security & Firewall (CSF), a powerful and free security suite that integrates directly with WHM.
Additionally, enable Two-Factor Authentication (2FA) for your root and reseller accounts within WHM’s Security Center to add an essential layer of protection against unauthorized access.
Source: https://www.tecmint.com/install-cpanel-whm-almalinux/


