How To Install WHM/cPanel On Server | Step By Step Guide
Introduction
If you are looking to install WHM/cPanel on your server, this step-by-step guide will help you set it up properly. Before starting, ensure you have a fresh server with the right OS and system requirements.
System Requirements
Before installing WHM/cPanel, ensure your server meets the minimum requirements:
Supported Operating Systems:
- AlmaLinux 8/9
- Rocky Linux 8/9
- CloudLinux 8/9 (Recommended for better security)
Minimum Hardware Requirements:
- CPU: 1.1 GHz (2.0 GHz+ Recommended)
- RAM: 2GB (4GB+ Recommended)
- Storage: 20GB SSD (100GB NVMe+ Recommended)
- Architecture: 64-bit
Logging Into Your Server
To begin the installation, log in to your server via SSH. You can use software like Putty to access your server remotely.
Download Putty: Putty SSH Client
Once installed, open Putty, enter your server's IP address, and connect using your root credentials.
Preparing Your Server
- Ensure your server has a fresh OS installation.
- Update your system:
yum update -y
Installing WHM/cPanel
Set the hostname (use a valid domain or subdomain):
hostnamectl set-hostname server.yourdomain.com
Install Perl and Curl:
yum install perl curl -y
Download and install WHM/cPanel:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Setting Up MySQL Version
If you want to specify the MySQL version before installation, follow these steps:
Create the cPanel profile directory:
mkdir -p /root/cpanel_profile
Open the configuration file with nano:
nano /root/cpanel_profile/cpanel.config
Add the following line for MySQL 8.0:
mysql-version=8.0
Save and exit (CTRL+X, then Y, then Enter).
Important: If you do not specify a MySQL version, WHM/cPanel will automatically install the latest MariaDB version instead.
For other MySQL versions, refer to the official cPanel documentation: Supported MySQL/MariaDB Versions.
Finalizing The Installation
After installation is complete, access WHM using your browser:
https://your-server-ip:2087
Log in using your root credentials and complete the setup wizard.
Conclusion
By following these steps, you can successfully install WHM/cPanel on your server. Ensure your server meets the recommended requirements for better performance. If you face any issues, feel free to ask in the forum!