cPanel & WHM supports several RHEL-compatible systems. Besides AlmaLinux, two popular choices are Rocky Linux, a community rebuild, and CloudLinux OS, which adds account isolation and is the standard for shared and reseller hosting. The steps are almost identical; this guide notes the differences. For AlmaLinux see install cPanel on AlmaLinux; for Ubuntu see install cPanel on Ubuntu.
Before you start
- OS: a fresh, minimal Rocky Linux 8/9 or CloudLinux 8/9, 64-bit. Check cPanel's current list of supported versions before you order. No web server, database or other panel installed.
- Resources: at least 2 GB RAM (4 GB recommended), 2 CPU cores and 40 GB disk (more for hosting accounts).
- Hostname: an FQDN such as
server.example.comthat is not used as a website, with an A record to the server IP. - Licence: a cPanel licence bound to the server IP (or the 15-day trial); for CloudLinux, also a CloudLinux licence.
- A static IPv4 address and root SSH access.
Prepare the server
- Set the hostname:
hostnamectl set-hostname server.example.com - Update everything and reboot:
dnf -y update && reboot - Disable NetworkManager-managed DHCP if your provider uses a static IP, and confirm the IP is configured statically.
- Rocky only: cPanel requires SELinux disabled. Set
SELINUX=disabledin/etc/selinux/configand reboot. CloudLinux ships with it disabled. - Make sure
perlandcurlare present:dnf -y install perl curl.
Run the installer
Start the installer inside a screen session so a dropped SSH connection does not stop it:
dnf -y install screen && screen -S cpanelcd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latestThe installation takes 30 to 60 minutes. On CloudLinux, the installer detects the OS and enables CloudLinux integration automatically.
First login and setup wizard
- Open
https://SERVER-IP:2087and log in asroot. - Accept the licence agreement and enter the contact email.
- Confirm the hostname, resolvers and main network device.
- Configure nameservers and choose the DNS server.
- Set the default service settings (FTP server, mail, cPHulk).
Every screen is explained in the WHM initial setup wizard.
Licence activation
cPanel checks the licence for the server IP automatically. If you buy the licence after installing, refresh it:
/usr/local/cpanel/cpkeycltFor CloudLinux, register the OS licence with rhnreg_ks --activationkey=YOUR-KEY if the provider has not done it.
Post-install hardening
- Install a firewall such as CSF or Imunify360.
- Enable cPHulk brute force protection and two-factor authentication for root.
- Use SSH keys and disable password login for root.
- Configure backups: WHM backup configuration or JetBackup 5.
- On CloudLinux, enable CageFS and set default LVE limits; see CloudLinux on cPanel.
Verify
- WHM loads over HTTPS with a valid hostname certificate (issued by AutoSSL).
- WHM → Server Status → Service Status shows all services up.
- Create a test account and open its site and webmail.
Troubleshooting
- Installer refuses to run: the server is not clean or the OS version is unsupported; reinstall a minimal OS.
- Hostname warning: the hostname is not an FQDN or does not resolve; fix the A record.
- Licence invalid: the licence IP differs from the server's main outgoing IP; check with
curl -s https://myip.cpanel.net/v1.0/.
