cPanel is a widely-used web hosting control panel that simplifies server management. Here's a step-by-step guide to installing cPanel on Ubuntu 22.04 LTS, CentOS, and AlmaLinux.
Prerequisites
- A fresh server installation (minimal setup).
- A public static IP address.
- Root access.
- Minimum hardware: 2 GB RAM, 20 GB disk space (higher recommended).
For Ubuntu 22.04 LTS (Jammy Jellyfish)
Step 1: Update the System
Make sure your system is up to date:
Step 2: Set the Hostname
Set an FQDN for the server:
Step 3: Install Perl
cPanel requires Perl to run the installer:
Step 4: Install cPanel
Download the cPanel installation script and run it:
The installation will take some time depending on your server's specifications.
Step 5: Access WHM
Once installed, access WHM (Web Host Manager) at:
Log in with your root credentials and follow the setup wizard.
For CentOS and AlmaLinux
Step 1: Update the System
Run:
Step 2: Set the Hostname
Set a fully qualified domain name:
Step 3: Disable SELinux
Edit the SELinux configuration file:
Set SELINUX=disabled
and save. Then reboot:
Step 4: Install cPanel
Run the installation script:
Step 5: Access WHM
Log in via:
Post-Installation Steps
- Activate License: WHM will prompt for license activation.
- Set Nameservers: Configure DNS.
- Security Hardening: Set up firewalls and other protections.
Key Differences
- CentOS: Stable but no longer actively developed (CentOS 7 is supported until 2024).
- AlmaLinux: Actively supported and recommended for new installations.
- Ubuntu 22.04: A newly supported OS by cPanel, suitable for those familiar with Ubuntu environments.
Conclusion
cPanel installation is now possible on Ubuntu 22.04, making it a versatile choice alongside CentOS and AlmaLinux. Follow the steps above to get started with cPanel on your VPS or dedicated server.