Official support for CentOS 7 ended on 30 June 2024 and current cPanel versions no longer install on CentOS 7. For a new cPanel server, choose a supported operating system such as AlmaLinux, Rocky Linux or Ubuntu. The steps below are kept for existing CentOS 7 servers.
This guide shows how to install cPanel on a CentOS 7 server.
First, get a cPanel licence. You can start with cPanel’s free trial or buy a licence from our server licence services.
Make sure the server is up to date:
yum upgrade
Install the kernel package and answer Y when asked:
yum install kernel
Remove the Apache package that may come with the system and answer Y:
yum remove httpd
Set a fully qualified hostname for the server (replace the example with your own):
hostname server.example.com
Run the installer with the following commands, in order:
mkdir /home/cpins
cd /home/cpins
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
The installation usually takes 1–2 hours. When it finishes, installing Perl is recommended to avoid errors:
yum install perl
The installation is now complete. Log in to WHM at https://your-server-ip:2087 to finish the initial setup; cPanel itself is available at https://your-server-ip:2083.
Can't find the information you are looking for?