Home / Blog / VPS & Cloud / How to Install cPanel & WHM on AlmaLinux 8 /…
VPS & Cloud

How to Install cPanel & WHM on AlmaLinux 8 / AlmaLinux 9

cPanel & WHM is the most widely used web hosting control panel in the world. This guide walks you through installing it on a fresh AlmaLinux 8 or AlmaLinux 9 VPS or dedicated server — the officially supported distributions as of 2024.

Prerequisites

  • A fresh AlmaLinux 8 or 9 server (no other control panels installed)
  • Minimum 1 GB RAM (2 GB+ recommended)
  • Minimum 20 GB disk space
  • Root SSH access
  • A valid hostname set to a fully qualified domain name (FQDN)
  • cPanel license (free 15-day trial available from cPanel)

Step 1 — Set a Proper Hostname

cPanel requires an FQDN hostname. Set it before installing:

bash
hostnamectl set-hostname server.yourdomain.com

Verify it:

bash
hostname -f

Step 2 — Update the System

Always start with a fully updated OS to avoid dependency issues:

bash
dnf update -y

Step 3 — Disable SELinux

cPanel does not support SELinux. Disable it permanently:

bash
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0

Step 4 — Run the cPanel Installer

The official one-line installer downloads and installs everything automatically. This takes 15–45 minutes depending on your server speed:

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

You can safely close the SSH session during installation — it runs in the background. Reconnect later and check progress with:

bash
tail -f /var/log/cpanel-install.log

Step 5 — Open Required Firewall Ports

If you use firewalld, open the ports cPanel needs:

bash
firewall-cmd --permanent --add-port={80,443,2083,2086,2087,2095,2096,21,22,25,110,143,465,587,993,995}/tcp
firewall-cmd --reload

Step 6 — Access WHM and Complete Setup

Once installation finishes, access WHM at:

url
https://YOUR_SERVER_IP:2087

Log in as root with your root password. WHM will run through a one-time setup wizard — configure your nameservers, contact email, and licence key here.

Common Post-Install Steps

  • Run WHM > Security Advisor and fix all flagged issues
  • Install CSF Firewall (see our separate guide)
  • Enable AutoSSL in WHM to automatically provision free SSL for accounts
  • Set up daily backups under WHM > Backup Configuration
  • Install Softaculous for one-click app installs

Conclusion

Installing cPanel on AlmaLinux is straightforward with the official one-line installer. Once WHM is set up, you can create hosting accounts, manage DNS, email, and SSL — all from a clean web interface. For production servers, always pair cPanel with a firewall like CSF and a security layer like Imunify360.