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 10 maanden geleden

Supported Operating Systems (as of 2025)

OSVersion
AlmaLinux8, 9 ✅ (Recommended)
Rocky Linux8, 9 ✅
CloudLinux8, 9 ✅ (For commercial environments)
Red Hat Enterprise Linux (RHEL)8, 9 ✅ (Partner licenses only)
CentOS is no longer supported. CentOS 7 reaches EOL in 2024. Use AlmaLinux or Rocky Linux instead.

System Requirements

ResourceMinimumRecommended
CPU1 core2+ cores
RAM2 GB 4 GB+
Disk 20 GB40 GB SSD+
IP Address1 static public IPv4
AccessRoot SSH access
cPanel must be installed on a fresh system with no LAMP/LEMP stack or services pre-installed.
 Installation Guide
Step 1: Set the Hostname

Ensure your hostname is a fully qualified domain name (FQDN):

Add it to /etc/hosts if needed:
Step 2: Update the System

For AlmaLinux / Rocky Linux / RHEL:

Install perl, curl, and other basic packages:

Step 3: Start the cPanel Installer

Run the installer inside a screen session (to avoid interruptions):

The installation takes 30–60 minutes. It installs Apache, PHP, MySQL/MariaDB, Exim, FTP, DNS, and more.

Step 4: Access WHM (WebHost Manager)

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:

Post-Installation Recommendations
  • 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

TaskCommand
Set Hostnamehostnamectl set-hostname server.yourdomain.com
Update Systemdnf update -y
Install cPanelcurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Access WHMhttps://your-ip:2087
Licensing Note
  • cPanel is a commercial software

  • 15-day free trial is available

  • Pricing based on number of cPanel accounts:
    🔗 https://cpanel.net/pricing/

Was this article helpful?

1 out of 1 liked this article

Still need help? Message Us