How to Install cPanel/WHM on CentOS 8

Install cPanel/WHM on CentOS

The cPanel is a popular web hosting control panel for Linux-based operating systems. It contains two great user interfaces: 

  • a server management interface 
  • a client-based graphical interface

The cPanel manages file manager, file and directory restoration, disk usage, backup, FTP accounts, FTP connections, and domains. It creates databases, such as MySQL databases, remote MySQL, and PHP my admin. It is Viable with all internet browsers. It speeds up the loading of the website. 

WHM is an acronym for Web Host Manager. WHM is a web-hosting administrative control panel for Linux-based operating systems. With cPanel, WHM provides a complete control panel for managing accounts and domains on the server.

The Control panel of the web browser contains all of the tools needed to design a website. Control panels like cPanel/WHM make things simpler. So Website administrators and full-time tech teams are not required to design a website. The cPanel is an end-user control panel while WHM is a reseller control panel. However, it is essential to know about cPanel, WHM, and the procedure of installing cPanel correctly on Centos 8 to use cPanel.

Must Read: 16 Best Open-Source Web Hosting Control Panels As Of 2023

Pre-requirements to install cPanel/WHM on CentOS 8

The cPanel/WHM cannot be installed on every device with CentOS. Some things are required to install cPanel/WHM on CentOS 8. Following are the pre-requirements to install cPanel/WHM on CentOS 8.

  • 64-bit CentOS
  • Minimum 1 GB Random Access Memory (RAM)
  • Minimum 20 GB space free in hard disk
  • Valid cPanel license
  • Standard Fully Qualified Domain Name (FQDN)

Installing cPanel/WHM on CentOS 8

Installation of cPanel/WHM is a complex process, which involves several steps to execute. Following are the various steps to be done to install cPanel/WHM on CentOS.

Step 1: Creation of server hostname

If the host server doesn’t have a standard, fully qualified domain name, create it. Run the following command to create a hostname.

hostnamectl set-hostname 

For example, in cpanel.tithi.lan, Cpanel is the hostname, and tithi.lan is the domain name

Step 2: Installation of Tar on the Server

If the server doesn’t have tar, install it. Run the following command to install tar. Ignore this step if tar is already installed. 

 yum install tar

Step 3: Installation of Perl on the Server

If the server doesn’t have Perl, install it. Run the following command to install Perl. Ignore this step if Perl is already installed. 

 yum install perl 

Step 4: Installation of cURLon the Server

If the server doesn’t have a cURL, install it. Run the following command to install cURL. Ignore this step if cURL is already installed. 

yum install curl 

Step 5: Download and run the auto-installer script

Execute the following command to download the auto-installer script.

curl -o latest -L https://securedownloads.cpanel.net/latest

Execute the following command to run the auto-installer script.

# sh latest

Step 6: Installation of screen

Screen installation is required when SSH protocol is used to connect the server. Run the screen command to check whether the operating system has a screen in the path. If the operating system has a screen in the path, the system will return /usr/bin/screen. If the server doesn’t have a screen, install it. Run the following command to install the screen. Ignore this step if the server is not connected using SSH protocol. 

yum install screen 

Step7: Access to WHM

After installing cPanel, the next step is accessing Web Host Manager. Reboot the system. Access WHM with the following URL:

https://SERVER_IP:2087

Step 8: Accept the End User License Agreement

Log in with the user Root and password. Agree on the End User License Agreement after reading it.

Step 9: Activate cPanel

The cPanel should be activated after accepting the end-user license agreement. To activate cPanel and get a cPanel notification, go to the setup networking section and give the server contact email address and server contact SMS address.

Step 10: Add hostname and resolvers

Add the server’s hostname and resolver entries in the set-up networking section. Google or ISP resolvers can be added here.

Step 11: Select the Main Network/Ethernet Device

Select the main network/ethernet device from the setup networking section and click the save button. The main IP address of the specified server is the device IP.

Step 12: Set up IP addresses

Add the static IP address for the main server. Choose one IP address from the network interface card.

Step 13: Add Nameservers and Hostname

Add nameservers in the empty fields, select a checkbox, and click the save button. 

Step 14: FTP Configuration

This step includes FTP configuration, mail server configuration, and adding MTAs. Select any option in FTP to configure FTP. Select the option Disabled if you want to disable FTP. Pure-FTPD is the most widely selected nowadays.

Step 15: Enable Cphulk

Enable Cphulk from the Cphulk brute force protection section to block the IP addresses from which brute force attacks are sent.

Step 16: Setup Quotas

Click on use file system quotas to check the disk space availability and send a notification. Click the finish setup wizard to complete the installation. The WHM Home page will display now.

Problems during installation of cPanel/WHM on CentOS 8

Some problems may occur during the installation of cPanel/WHM on CentOS 8. Additional steps are done to solve this problem. If the problem is not solved by doing anything, Open a ticket with cPanel customer care service for additional help. Following are the problems during the installation of cPanel/WHM on CentOS.

  • License errors

The reasons for license errors are invalid hostname, incorrect time and date, connection problem issue cPanel, and Expired license. License errors can be solved by verifying the license’s IP address to know whether the license is still valid or expired, checking the server’s connectivity, checking to resolve, checking whether the hostname is valid, and updating the time and date of the server.

  • Security issues on the website

The reason for security issues of the website is the cPanel, and WHM servers install self-signed certificates, which are not recognized by modern web browsers as secured. Security issues of the website can be solved by purchasing a certificate from Purchase and Install an SSL Certificate.

  • RPMs or .deb packages failures

The reasons for RPMs or .deb package failures are a package that doesn’t exist in the server, rogue RPMs, inability to unpack the new package to the correct location, the system classifies a package as obsolete, and full or immutable destination directory.

  • Error message during the Perl installation

During Perl installation, the following error message will display if the installation of Perl fails.

Fatal! Perl must be installed before proceeding!

  • High CPU load

The main reason for the high CPU load is the non-interruptible sleep of the memory pressure. To solve this problem, make this sleep interruptible.

  • Hostname issues

The main problem with the hostname issue is the hostname setting is lost when a server is hosted in the cloud. To solve this problem, you must develop a dhclient exit hook script that correctly sets the hostname.

Conclusion 

On Centos, cPanel is recommended for maximum server resource utilization and stability. You can begin working with your server without logging in with the help of a control panel. Imagine placing an order for a Linux or Windows server. Complementary software like Apache, Nginx, MySQL, phpMyAdmin, etc., need to be installed on it. If you need to upload files, an FTP server is also essential. It could take a few hours for an experienced administrator, but if you’re new to this, it could take days to understand and set up correctly. The Control panel can do all the work done by complementary software in a minute, so you can rest assured that nothing will go wrong and everything will function as intended. 

Installation and use of cPanel/WHM version 94 on CentOS 8 is easy. CentOS supports cPanel without any issues. Compared to previous versions of CentOS, CentOS 8 features the most significant changes. CentOS 8 removed support for the TCP Wrappers package, which affected cPanel and WHM’s functionality. One of the most important aspects of website optimization on CentOS 8 is knowing how to install cPanel/WHM on CentOS 8.

Share this:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.