How to Install cPanel/WHM on a VPS
Installing cPanel/WHM on your VPS gives you a powerful web hosting control panel for managing websites, email accounts, DNS, and more. Follow these steps to install cPanel/WHM on a supported VPS (typically running CentOS, AlmaLinux, or CloudLinux) with root access.
1. Prepare Your VPS
- Supported Operating System:
Ensure your VPS is running a supported OS such as CentOS 7/8, AlmaLinux 8, or CloudLinux. A fresh, minimal installation is recommended. - Set a Fully Qualified Domain Name (FQDN):
Before installation, set a proper hostname. For example:hostnamectl set-hostname server.yourdomain.com
- Update Your System:
Update packages to ensure your system is up to date:yum update -y
- Disable SELinux:
Edit the SELinux configuration file to disable it (or set it to permissive mode) as cPanel recommends disabling SELinux:nano /etc/selinux/config
Change
SELINUX=enforcing
toSELINUX=disabled
, then save and reboot the server:reboot
2. Set Up Required Configurations
- Ensure a Clean Environment:
Make sure no other web control panels or conflicting services are installed. - Check for a Valid License:
cPanel/WHM requires a valid license. You can obtain one from cPanel’s website or via your hosting provider after installation.
3. Download and Run the cPanel/WHM Installer
- Log in as Root:
Access your VPS via SSH as the root user. - Download the Installer:
Run the following command to download the cPanel installer:cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest
- Run the Installer:
Execute the installer script. Note that this process can take 30-60 minutes, depending on your VPS performance and network speed.sh latest
4. Complete the Installation and Initial Setup
- Access WHM:
Once the installation is complete, open your web browser and navigate to:https://your-server-ip:2087
(Replace
your-server-ip
with your VPS’s IP address.) - Log in to WHM:
Use the root username and password to log in. - Initial Configuration Wizard:
Follow the on-screen wizard to:- Accept the End-User License Agreement (EULA).
- Enter your valid cPanel license details (if prompted).
- Configure basic settings such as networking, nameservers, and contact information.
- Secure Your Installation:
WHM provides options to configure firewall rules, enable automatic updates, and set up additional security measures. Take time to review and secure your new installation.
Final Thoughts
Installing cPanel/WHM on your VPS transforms it into a robust hosting environment, making it easier to manage multiple websites and services. With a supported OS, proper configurations, and a valid cPanel license, you’re ready to leverage one of the industry’s most popular hosting control panels.
Need additional help? Consult cPanel’s official documentation or support forums for further troubleshooting and advanced configuration tips.
Ready to manage your hosting like a pro? Follow these steps, and you’ll have cPanel/WHM up and running on your VPS in no time!