Introduction to cPanel
cPanel is one of the world’s most popular control panels for Linux servers. Although it is not the cheapest option available, its user-friendly UI and extensive range of plugins and tools make it the preferred choice for IT admins and webmasters in 2023.
While cPanel and WHM are separate portals, they are deployed together during the same installation process. Before we dive into the installation steps, let’s explore the main features of cPanel and WHM.
Features of cPanel and WHM
cPanel Features
- Domains, Addon Domains, and Subdomains Management
- Email Accounts Administration
- Log Files and Statistics
- Database Management
- File Manager
- SSL Certificates and Security Settings
WHM Features
- Server Configuration and Monitoring
- Services Fine-Tuning (Mail, FTP, Apache/Nginx, PHP, etc.)
- Backup Settings and Migration Tool
- Third-Party Plugins Installation and Management
- Manage cPanel Own Branding
- Reseller Management
Easy Steps to Install cPanel/WHM on Ubuntu 22.04 Server
Step 1 — Disable firewalld and Update the System
Disable and stop any active firewalls before installing cPanel. You can re-enable them after installation.
[email protected]:~$ iptables-save > ~/firewall.rules [email protected]:~$ systemctl stop firewalld.service [email protected]:~$ systemctl disable firewalld.service
Next, update the server packages:
[email protected]:~$ apt update && apt upgrade
Step 2 — Set Hostname (FQDN)
Assign a fully qualified domain name (FQDN) to your server for a seamless installation.
[email protected]:~$ vi /etc/hostname
Replace any entries with your hostname (e.g., cpanel.netshop-isp.com.cy) and save the file.
Next, update the /etc/hosts
file with the server’s IP and hostname:
192.168.1.1 cpanel.netshop-isp.com.cy cpanel
Step 3 — Install cPanel/WHM
Download and run the official installation script:
[email protected]:~$ cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
If no errors occur, the installation should complete in a few minutes.
Step 4 — Access WHM/cPanel GUI
Access the WHM GUI via your browser using any of the following URLs:
https://[server-ip]:2087
https://[server-ip]/whm
https://fqdn-hostname/whm
https://fqdn-hostname:2087
Extra Step (if needed) — Activate License
cPanel licenses are IP-based. If your license is not activated, refresh it using the following command:
[email protected]:~$ /usr/local/cpanel/cpkeyclt