System Update
Update all system packages to latest version
Update system packages
yum update -y
Updates all system packages to the latest version. Essential for security and compatibility.
Custom Database Configuration (Optional)
Setup MySQL/MariaDB version for cPanel installation
Navigate to root directory
cd /root
Create cPanel profile directory
mkdir cpanel_profile
Navigate to profile directory
cd cpanel_profile
Create configuration file
touch cpanel.config
Edit configuration file
vi cpanel.config
Add one of these lines in the file:
• MySQL 8.0:
• MariaDB 10.11:
• MariaDB 10.6:
• MariaDB 10.5:
• MariaDB 10.4:
• MySQL 8.0:
mysql-version=8.0• MariaDB 10.11:
mysql-version=10.11• MariaDB 10.6:
mysql-version=10.6• MariaDB 10.5:
mysql-version=10.5• MariaDB 10.4:
mysql-version=10.4
Save and exit vi editor
Press ESC, then type :wq and press Enter
Return to home directory
cd /home
Reboot to Apply Kernel Changes
reboot
Use this simple command to reboot your server after making kernel changes or completing major installations.
Install Prerequisites
Install required packages for cPanel
Install Perl
yum install perl -y
Installs Perl which is required for many cPanel components and scripts.
Network Configuration
Configure network settings for cPanel installation
Stop NetworkManager service
systemctl stop NetworkManager
Disable NetworkManager from startup
systemctl disable NetworkManager
Stop firewall service
systemctl stop firewalld
Disable firewall from startup
systemctl disable firewalld
Disable SELinux temporarily
setenforce 0
Disable SELinux permanently
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Configure DNS servers
echo -e "nameserver 8.8.8.8\nnameserver 1.1.1.1" > /etc/resolv.conf
Test network connectivity
ping -c 3 google.com
Expected Output:
PING google.com (142.250.185.206) 56(84) bytes of data.
64 bytes from maa05s18-in-f14.1e100.net (142.250.185.206): icmp_seq=1 ttl=117 time=15.3 ms
64 bytes from maa05s18-in-f14.1e100.net (142.250.185.206): icmp_seq=2 ttl=117 time=15.2 ms
64 bytes from maa05s18-in-f14.1e100.net (142.250.185.206): icmp_seq=3 ttl=117 time=15.4 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
Set server hostname
hostnamectl set-hostname net.hosttrip.com
Important: Replace "net.hosttrip.com" with your actual domain name or desired hostname.
cPanel Installation
Install cPanel control panel
Navigate to home directory
cd /home
Download cPanel installer
curl -o latest -L https://securedownloads.cpanel.net/latest
Run cPanel installer
sh latest
Important: This takes 15-45 minutes. Do not interrupt the installation process. Ensure stable internet connection.
Open cPanel Ports
Configure firewall for cPanel access
Open WHM port (2087)
firewall-cmd --permanent --add-port=2087/tcp
Open cPanel port (2083)
firewall-cmd --permanent --add-port=2083/tcp
Open HTTP port (80)
firewall-cmd --permanent --add-port=80/tcp
Open HTTPS port (443)
firewall-cmd --permanent --add-port=443/tcp
Reload firewall rules
firewall-cmd --reload
Ports: 2087 (WHM), 2083 (cPanel), 80 (HTTP), 443 (HTTPS)
CRITICAL: Before Installing Any Addons
Complete these essential configurations in WHM before installing any addon licenses:
- Basic cPanel/WHM Setup: Complete the initial WHM setup wizard including network configuration, nameserver setup, and service configuration
- IonCube Loader Installation: Install IonCube Loader via WHM → PHP Pecl Manager or EasyApache 4 → PHP Extensions
- PHP Configuration: Set up PHP versions and ensure proper PHP handlers are configured
- Service Verification: Ensure all cPanel services (Apache, MySQL, Exim, etc.) are running properly
- Security Configuration: Configure basic security settings, firewall rules, and SSH access
WARNING: Installing addon licenses before completing basic server setup may cause conflicts, licensing issues, and unstable server behavior. Always complete cPanel/WHM initial setup first!
CloudLinux Installation
Install CloudLinux for enhanced server security
Download CloudLinux installer
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
Install CloudLinux
sh cldeploy -i
Re-enable NetworkManager
systemctl enable NetworkManager
Start NetworkManager
systemctl start NetworkManager
Reboot server
reboot
Warning: Server will reboot after this step. Wait 2-3 minutes before attempting to reconnect. If you experience reboot issues, use the troubleshooting commands below.
Fix CloudLinux Reboot Issues
Troubleshoot CloudLinux installation problems
Update kernel from testing repository
yum -y update kernel --enablerepo=cloudlinux-updates-testing
Reboot to apply changes
reboot
Warning: This command enables the testing repository which may contain less stable packages. Only use if you're experiencing reboot issues with the stable kernel.
SMM & Banking Panels Configuration
Configure MySQL for SMM and banking panels
Edit MySQL configuration
nano -w /etc/my.cnf
Add under [mysqld] section
sql_mode=
Important: Setting
sql_mode= to empty disables strict SQL mode, which is often required by SMM and banking panels to function properly.
Restart MariaDB service
systemctl restart mariadb
Or restart MySQL service
systemctl restart mysqld