How to install cpanel on centos 7 / CloudLinux / RHEL

This guide will help you get up and running with cPanel on your CentOS 7 server. You may obtain a license from the cPanel Store or your Hosting provider will issue a CPanel license

let’s get started with CPanel

Prepare for the Installation

before running the install script please set the hostname on centos 7 server

change your current hostname, execute the following command

[root@nod home]# hostnamectl set-hostname server1.mydomain.com --static

You must disable OS firewalls before you run the cPanel & WHM installation and disable SELinux on your server

[root@nod home]# vi /etc/selinux/config

SELINUX=disabled
SELINUXTYPE=targeted

save and exit

Install cPanel

4. To install cPanel & WHM on your server, execute the following command

[root@nod home]# cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Note that the installation process may take a long time to complete. Once the installation has been completed, you should see the following output


[2020-07-04 10:04:10 +0000] [2480] ( INFO): Congratulations! Your installation of cPanel & WHM 11.88 is now complete. The next step is to configure your server. 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 1. Open your preferred browser
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 2. Navigate to the following url using the address bar and enter this one-time autologin url:
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): https://10.100.100.10:2087/cpsess2288961282/login/?session=root%3aVriGxQMrP6HMFpLM%3acreate_user_session%2c360b306520e2625a42835223c06ac305
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): After the login url expires you generate a new one using the 'whmlogin' command or manually login at:
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): https://10.100.100.10:2087
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server.
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/allfaq for additional support
[2020-07-04 10:04:10 +0000] [2480] ( INFO): 
[2020-07-04 10:04:10 +0000] [2480] ( INFO): Thank you for installing cPanel & WHM 11.88!
Removing /root/installer.lock.
[root@nod home]#

Next, open your web browser and type the URL https://serverip:2087 to access to WHM / cPanel login screen

That’s it! You’ve just installed CPanel on your server

Related Post

Leave a Reply