How to install cPanel on CentOS, Ubuntu, AlmaLinux

In this article, we will show you how to install cPanel on CentOS, Ubuntu, AlmaLinux VPS, as well as go through the initial configuration.

cPanel is top hosting control panel for Linux which has a user-friendly web interface – with it, users can manage their websites, email addresses, FTP accounts, DNS records, databases, and shell accounts.

  • CentOS 6 and Red Hat Enterprise Linux 6 CentOS 8 
  • CloudLinux 6
  • CentOS 7, Red Hat Enterprise Linux 7, CloudLinux 7
  • Ubuntu 20.04 LTS
  • CloudLinux 8
  • AlmaLinux OS 8

Operating systems Check This.

Vps Provider With Port 25 Open – Install cPanel

The second thing you will need is a VPS server. a public server to install & Setup SMTP.

In My Post i Am Using Digitalocean Vps Server.

Here is a list of some companies:

List of VPS Hosting Providers Offering Open Port 25

Prepare for Installation

Centos:-

yum install perl
yum install curl
hostnamectl set-hostname myeserver.mydomain.com
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest

Ubuntu:-

sudo apt update 
sudo apt upgrade
hostname cpanel.yourdomainname.com
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

AlmaLinux:-

yum update -y
yum install perl
yum install curl
hostnamectl set-hostname myeserver.mydomain.com
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

URL to login to the admin panel of cPanel / WHM: https://serverIP:2087

Username = root

pass = your vps root password

Install cPanel – Key Takeaways

To install cpanel successfully, follow each step in the guide above in order. If something doesn't work, revisit the prerequisites and try again. For reference, see the official cPanel documentation.

Key Takeaways

  • This guide covered installing cPanel step by step, from prerequisites to verification.
  • Always test changes on a staging server before applying them in production.
  • Keep backups of your configuration files so you can roll back quickly if needed.
  • For related tutorials, see our other guides on email servers and VPS management.

Troubleshooting Tips

If you run into issues while installing cPanel, check the system logs first — most errors leave a clear trace in /var/log/. Make sure all required packages are installed and your firewall allows the necessary ports. Restarting the relevant service often resolves transient failures. If a step fails consistently, verify file permissions and ownership, as incorrect permissions are a common cause of silent failures on Linux servers.

Frequently Asked Questions

Do I need root access? Yes, most server administration tasks require root or sudo privileges.

Will this work on other Linux distributions? The concepts apply broadly, though exact commands and file paths may differ between distributions.

How do I verify it worked? Follow the verification steps in the guide above and check the service status with systemctl status.

Leave a Comment