This article provides a guide for how to install cPanel on CentOS 7 server, such as VPS or dedicated servers.
Prerequisites
- 20 GB Disk
- 1 GB RAM
- 64-bit CentOS 7 (installation guide), RHEL 7 (installation guide), or CloudLinux 7 (installation guide)
- A valid IP address
- A valid subnet address
- A valid gateway IP address
- NetworkManager must be disabled (see guide)
- SELinux must be disabled (see guide)
- Server hostname must be fully-qualified domain name, contain fewer than 60 total characters, and different from any cPanel account's domain.
- Examples:
- server.example.com
- cloud.example.com
- Examples:
- Valid cPanel/WHM license
How to Install cPanel on CentOS 7 Server
To install cPanel on CentOS 7 server, follow the steps:
- Login to the SSH terminal as root user.
- Run the following commands:
yum -y update
yum -y install nano perl
echo "CPANEL=lts" >> /etc/cpupdate.conf
echo "RPMUP=daily" >> /etc/cpupdate.conf
echo "SARULESUP=daily" >> /etc/cpupdate.conf
echo "STAGING_DIR=/usr/local/cpanel" >> /etc/cpupdate.conf
echo "UPDATES=daily" >> /etc/cpupdate.conf
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest - Wait until the install script has finished (15-45 minutes).
- Login to the WHM interface (https://<your_ip_address>:2087)
- Accept the cPanel terms of service and enter the nameservers
Conclusion
You now know how to install cPanel on CentOS 7 server.