How to Install cPanel/WHM on a Linux Server (2025 Guide)
cPanel & WHM is one of the most widely used commercial control panels for managing web hosting, domains, emails, databases, and more through an intuitive web interface.
Evans
Last Update 2 months ago
Supported Operating Systems (as of 2025)
OS | Version |
AlmaLinux | 8, 9 ✅ (Recommended) |
Rocky Linux | 8, 9 ✅ |
CloudLinux | 8, 9 ✅ (For commercial environments) |
Red Hat Enterprise Linux (RHEL) | 8, 9 ✅ (Partner licenses only) |
System Requirements
Resource | Minimum | Recommended |
CPU | 1 core | 2+ cores |
RAM | 2 GB | 4 GB+ |
Disk | 20 GB | 40 GB SSD+ |
IP Address | 1 static public IPv4 | |
Access | Root SSH access |
Step 1: Set the Hostname
Ensure your hostname is a fully qualified domain name (FQDN):
For AlmaLinux / Rocky Linux / RHEL:
Step 3: Start the cPanel Installer
The installation takes 30–60 minutes. It installs Apache, PHP, MySQL/MariaDB, Exim, FTP, DNS, and more.
Once the installation completes, access WHM via:
Login using your root user and password.
You’ll be guided through initial setup:
License activation (trial available)
Nameserver configuration
Default contact and security settings
Open Required Ports (Optional Firewall Setup)
If using firewalld:
Add hosting packages (disk, bandwidth, email limits)
Configure DNS cluster (if needed)
Add SSL with AutoSSL / Let’s Encrypt
Create cPanel accounts for websites
Set up backups and security alerts
Configure Mail (Exim, SPF, DKIM, etc.)
Summary
Task | Command |
Set Hostname | hostnamectl set-hostname server.yourdomain.com |
Update System | dnf update -y |
Install cPanel | curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest |
Access WHM | https://your-ip:2087 |
cPanel is a commercial software
15-day free trial is available
Pricing based on number of cPanel accounts:
🔗 https://cpanel.net/pricing/