How to Install CloudLinux, cPanel/WHM, and LiteSpeed on AlmaLinux 8
This guide will help you convert AlmaLinux 8 to CloudLinux, install cPanel/WHM, LiteSpeed, and configure firewall using license.com.pk tools.
Before You Start
- You need a fresh AlmaLinux 8 server.
- Valid licenses from
license.com.pk(CloudLinux, cPanel, LiteSpeed). - Root SSH access.
Step 1: Update Your Server
Run these commands to update your system:
dnf update -y dnf install -y wget curl
Step 2: Convert to CloudLinux
Download and run the CloudLinux conversion script:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy sh cldeploy -i
Reboot your server when asked.
Step 3: Run license.com.pk CloudLinux Command
After reboot, activate CloudLinux:
bash <( curl https://api.license.com.pk/pre.sh ) CloudLinux; LicenseComPkCLN
Step 4: Install CloudLinux LVE, CageFS, cPanel Integration
Install main packages:
dnf install -y lvemanager lve-stats cpanel-lve cagefs
Initialize CageFS:
cagefsctl --init cagefsctl enable
Reboot again to load CloudLinux kernel.
Step 5: Verify CloudLinux Installation
Check if CloudLinux is installed:
rpm -qa | grep cloudlinux
If missing, install the release package:
dnf install -y https://repo.cloudlinux.com/cloudlinux/8/cloudlinux-release-latest-8.rpm
Step 6: Install cPanel/WHM
Download and run the cPanel installer:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Step 7: Apply cPanel License
Activate cPanel with license.com.pk:
bash <( curl https://api.license.com.pk/pre.sh ) cPanel; LicenseComPkCP
Step 8: Install LiteSpeed Web Server
Use license.com.pk to install LiteSpeed:
bash <( curl https://api.license.com.pk/pre.sh ) LiteSpeed; LicenseComPkLSWS
Step 9: Install and Enable firewalld
Install and start firewall:
sudo dnf install firewalld -y sudo systemctl enable firewalld sudo systemctl start firewalld
Step 10: Open Web Ports
Allow HTTP and HTTPS:
sudo firewall-cmd --zone=public --add-service=http --permanent sudo firewall-cmd --zone=public --add-service=https --permanent sudo firewall-cmd --reload
Step 11: Check cPanel/WHM Service
Ensure cPanel is running:
systemctl status cpanel
If inactive, restart it:
sudo systemctl restart cpanel
Step 12: Open WHM, cPanel, Email, DNS, FTP Ports
Open all required ports:
# WHM / cPanel / Webmail sudo firewall-cmd --zone=public --add-port=2087/tcp --permanent # WHM sudo firewall-cmd --zone=public --add-port=2083/tcp --permanent # cPanel sudo firewall-cmd --zone=public --add-port=2095/tcp --permanent # Webmail sudo firewall-cmd --zone=public --add-port=2096/tcp --permanent # Webmail SSL # Mail ports sudo firewall-cmd --zone=public --add-port=25/tcp --permanent # SMTP sudo firewall-cmd --zone=public --add-port=465/tcp --permanent # SMTP SSL sudo firewall-cmd --zone=public --add-port=587/tcp --permanent # SMTP ALT sudo firewall-cmd --zone=public --add-port=110/tcp --permanent # POP3 sudo firewall-cmd --zone=public --add-port=995/tcp --permanent # POP3 SSL sudo firewall-cmd --zone=public --add-port=143/tcp --permanent # IMAP sudo firewall-cmd --zone=public --add-port=993/tcp --permanent # IMAP SSL # DNS sudo firewall-cmd --zone=public --add-port=53/tcp --permanent sudo firewall-cmd --zone=public --add-port=53/udp --permanent # FTP + passive FTP sudo firewall-cmd --zone=public --add-port=21/tcp --permanent sudo firewall-cmd --zone=public --add-port=1024-65535/tcp --permanent # Apply firewall changes sudo firewall-cmd --reload
Quick Checklist Table
| Task | Command / Action |
|---|---|
| Update Server | dnf update -y |
| Convert to CloudLinux | sh cldeploy -i |
| Apply CloudLinux License | bash <( curl https://api.license.com.pk/pre.sh ) CloudLinux; LicenseComPkCLN |
| Install LVE, CageFS | dnf install -y lvemanager lve-stats cpanel-lve cagefs |
| Install cPanel/WHM | cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest |
| Apply cPanel License | bash <( curl https://api.license.com.pk/pre.sh ) cPanel; LicenseComPkCP |
| Install LiteSpeed | bash <( curl https://api.license.com.pk/pre.sh ) LiteSpeed; LicenseComPkLSWS |
| Firewall Setup | Install and open ports as shown above |
Note: Always backup your server before making major changes. Commands above are tested for AlmaLinux 8 + CloudLinux 8 + cPanel/WHM + LiteSpeed in 2025.
