Følgende indlæg indeholder en komplet installationsvejledning for cPanel på AlmaLinux 9. Vejledningen er skrevet på engelsk, som anmodet.
ENGLISH GUIDE: Complete cPanel installation on AlmaLinux 9
Prerequisites
- A fresh AlmaLinux 9 minimal install (no other control panels).
- Root access (SSH as root).
- A valid cPanel license or trial (cPanel will not operate without a license).
- A fully qualified hostname (FQDN) set for the server, e.g. cpserver.example.com.
- Open outbound access to download the installer.
1) Update system and install basic tools
# dnf -y update
# dnf -y install perl wget curl
2) Set a proper hostname
# hostnamectl set-hostname cpserver.example.com
# echo "SERVER_IP cpserver.example.com cpserver" >> /etc/hosts (adjust if necessary)
3) Disable or set SELinux to permissive (cPanel requires SELinux not enforcing)
# setenforce 0
# sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
4) Ensure no other control panels are installed
Remove Plesk, Webmin, Virtualmin etc. cPanel must run on a clean system.
5) Open required firewall ports (example using firewalld)
# firewall-cmd --permanent --add-port=2087/tcp # WHM (secure)
# firewall-cmd --permanent --add-port=2086/tcp # WHM (insecure)
# firewall-cmd --permanent --add-port=2083/tcp # cPanel (secure)
# firewall-cmd --permanent --add-port=2082/tcp # cPanel (insecure)
# firewall-cmd --permanent --add-port=2096/tcp # Webmail (secure)
# firewall-cmd --permanent --add-port=2095/tcp # Webmail (insecure)
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=443/tcp
# firewall-cmd --permanent --add-port=21/tcp # FTP (if used)
# firewall-cmd --permanent --add-port=22/tcp # SSH
# firewall-cmd --permanent --add-port=53/tcp
# firewall-cmd --permanent --add-port=53/udp
# firewall-cmd --permanent --add-port=3306/tcp # MySQL (if remote access required)
# firewall-cmd --reload
6) Download and run the official cPanel installer
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
Notes: installation can take 30–90 minutes depending on hardware and network. The installer will fetch packages and configure the system. Keep SSH session open or use tmux/screen.
7) After installation — initial WHM setup
- Open https://SERVER_IP:2087 and log in as root.
- Complete the WHM initial setup wizard: accept license, set nameservers, configure contact email, etc.
8) Post-install configuration recommendations
- Configure DNS resolvers in WHM > Basic cPanel & WHM Setup.
- Set nameservers and glue records at your registrar.
- Create hosting packages and default account settings.
- Configure automatic backups (WHM > Backup > Backup Configuration).
- Harden SSH: disable root login over password if using keys; change port if desired.
- Install and configure CSF (ConfigServer Firewall) if you prefer; cPanel is compatible.
Useful cPanel maintenance scripts
- Force update: /usr/local/cpanel/scripts/upcp --force
- Check and fix RPMs: /usr/local/cpanel/scripts/check_cpanel_rpms --fix
- Rebuild Queues: /usr/local/cpanel/scripts/restartsrv_cpsrvd
AlmaLinux 9 specific notes
- Ensure you run a supported kernel/arch (x86_64).
- Minimal install is recommended to avoid package conflicts.
- If using cloud images from some providers, ensure network and hostname are correctly set before install.
Troubleshooting
- If the installer fails, review /var/cpanel/updatelogs and /var/log/messages.
- Use upcp and check_cpanel_rpms to fix common package issues.
License and billing
- cPanel requires a valid license. After install, WHM will prompt for license activation. Ensure the server IP is covered.
Security and best practices summary
- Use strong root and WHM passwords or SSH keys.
- Keep the system updated and monitor cPanel updates via WHM or upcp.
- Configure regular backups and test restores.
End of guide.
ENGLISH GUIDE: Complete cPanel installation on AlmaLinux 9
Prerequisites
- A fresh AlmaLinux 9 minimal install (no other control panels).
- Root access (SSH as root).
- A valid cPanel license or trial (cPanel will not operate without a license).
- A fully qualified hostname (FQDN) set for the server, e.g. cpserver.example.com.
- Open outbound access to download the installer.
1) Update system and install basic tools
# dnf -y update
# dnf -y install perl wget curl
2) Set a proper hostname
# hostnamectl set-hostname cpserver.example.com
# echo "SERVER_IP cpserver.example.com cpserver" >> /etc/hosts (adjust if necessary)
3) Disable or set SELinux to permissive (cPanel requires SELinux not enforcing)
# setenforce 0
# sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
4) Ensure no other control panels are installed
Remove Plesk, Webmin, Virtualmin etc. cPanel must run on a clean system.
5) Open required firewall ports (example using firewalld)
# firewall-cmd --permanent --add-port=2087/tcp # WHM (secure)
# firewall-cmd --permanent --add-port=2086/tcp # WHM (insecure)
# firewall-cmd --permanent --add-port=2083/tcp # cPanel (secure)
# firewall-cmd --permanent --add-port=2082/tcp # cPanel (insecure)
# firewall-cmd --permanent --add-port=2096/tcp # Webmail (secure)
# firewall-cmd --permanent --add-port=2095/tcp # Webmail (insecure)
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=443/tcp
# firewall-cmd --permanent --add-port=21/tcp # FTP (if used)
# firewall-cmd --permanent --add-port=22/tcp # SSH
# firewall-cmd --permanent --add-port=53/tcp
# firewall-cmd --permanent --add-port=53/udp
# firewall-cmd --permanent --add-port=3306/tcp # MySQL (if remote access required)
# firewall-cmd --reload
6) Download and run the official cPanel installer
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
Notes: installation can take 30–90 minutes depending on hardware and network. The installer will fetch packages and configure the system. Keep SSH session open or use tmux/screen.
7) After installation — initial WHM setup
- Open https://SERVER_IP:2087 and log in as root.
- Complete the WHM initial setup wizard: accept license, set nameservers, configure contact email, etc.
8) Post-install configuration recommendations
- Configure DNS resolvers in WHM > Basic cPanel & WHM Setup.
- Set nameservers and glue records at your registrar.
- Create hosting packages and default account settings.
- Configure automatic backups (WHM > Backup > Backup Configuration).
- Harden SSH: disable root login over password if using keys; change port if desired.
- Install and configure CSF (ConfigServer Firewall) if you prefer; cPanel is compatible.
Useful cPanel maintenance scripts
- Force update: /usr/local/cpanel/scripts/upcp --force
- Check and fix RPMs: /usr/local/cpanel/scripts/check_cpanel_rpms --fix
- Rebuild Queues: /usr/local/cpanel/scripts/restartsrv_cpsrvd
AlmaLinux 9 specific notes
- Ensure you run a supported kernel/arch (x86_64).
- Minimal install is recommended to avoid package conflicts.
- If using cloud images from some providers, ensure network and hostname are correctly set before install.
Troubleshooting
- If the installer fails, review /var/cpanel/updatelogs and /var/log/messages.
- Use upcp and check_cpanel_rpms to fix common package issues.
License and billing
- cPanel requires a valid license. After install, WHM will prompt for license activation. Ensure the server IP is covered.
Security and best practices summary
- Use strong root and WHM passwords or SSH keys.
- Keep the system updated and monitor cPanel updates via WHM or upcp.
- Configure regular backups and test restores.
End of guide.