Search Our Database

How to Install cPanel on CentOS

Last updated on |
by

Introduction

cPanel is an online Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site or email.

 

Prerequisite:

  1. Launch a CentOS 8 instance (Only install cPanel & WHM on a freshly-installed operating system).
  2. Access the instance via SSH.
  3. Run all the following commands from the shell/terminal (All commands need to be run as the root user).
  4. You need to purchase your own cPanel license to use the control panel.

 

Instructions:

1: Set a valid hostname (FQDN) for your system. Note: Replace “your-hostname.example.com” with a FQDN.

hostname <your-hostname.example.com>

 

2: Disable SELinux.

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

3: Download and run the installation script. Tips: You may use the screen utility in case your session disconnects during installation.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

 

4: Wait for the installation to complete.

 

5: While waiting for the installation, you might want to allow all the required ports on the security group for your instance (eg: WHM SSL, FTP, HTTP, HTTPS). Please follow the guide here.

Note: To know which ports are used by cPanel & WHM, please refer to this official documentation: https://documentation.cpanel.net/display/CKB/How+to+Configure+Your+Firewall+for+cPanel+Services

 

6: Set a password for root. You will be prompted to enter the new root password after entering the command below:

passwd <password here>

 

7: Browse to https://<your-server-ip>:2087to access the WHM, and login as root.

 

After completing all the steps above, you should now be logged in to your WHM on your server.

 

 

 

Conclusion

By following this guide, you will have successfully installed cPanel on your CentOS 7 server. You can now use cPanel/WHM to manage your server, domains, and websites easily. Ensure that you regularly update the server and cPanel to maintain security and performance.

For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.

 

 

 

Article posted on 22 February 2020 by Louis