CentOS Linux provides a free and open-source computing platform, meaning that it is basically a community-supported enterprise operating system, compatible with its upstream source Red Hat Enterprise Linux. The newest version, CentOS 8 was released on September 24th, 2019 and it has brought some new features with it which we will explore in-depth later; but in this article, we are going to explore what cPanel and WHM are, and, how to install cPanel/WHM on your Centos 8.
What is cPanel?
cPanel is a popular, secure, and effective commercial control panel for web hosting services. It includes many features and can be used through a powerful graphical user interface to manage shared, re-seller, business hosting services, and more.
What is WHM?
cPanel comes with a Web Host Manager (WHM), which makes web hosting easier for web admins as it provides a root and reseller level access interface, where users can manage settings related to server administration and account management. This is while cPanel offers a user-level access interface to manage a web hosting account on the server.
Features and Functions of cPanel/WHM
- Powerful Graphics User Interface to control your server with WHM.
- Supports EV Certificates.
- Supports API Authentication Tokens.
- Now offers AutoSSL supporting Proxy Subdomains.
- Enables you to view SSL Status in cPanel.
- Supports operations such as Backups, Migrations, and restorations in a very easy and smooth manner.
- Supports excellent DNS and mail server management for the main server as well as client account.
- Supports management (start/stop/enable/disable) of services on server.
- Enables you to configure SSL/TLS for all server services and client domains.
- Easy integration with PHPmyadmin to manage your MySQL databases from web browser.
- Supports rebranding.
We will now cover how to install cPanel – WHM on Cent 8.
- Once you have installed cPanel/WHM, it can’t be removed from your system. You will have to reinstall the operating system to remove it.
- cPanel is a commercial software and requires a license to work. However, there is a 15-day trial (which is automatically activated once you install cPanel). You can install your software using the trial, then purchase the software later.
How to Install cPanel-WHM on CentOS 8?
- Minimum of 1GB RAM (2GB is recommended).
- At least 20GB of free disk space (but 40GB recommended).
- A valid cPanel license.
- Standard hostname (FQDN “Fully Qualified Domain Name”)
- Perl language
Step 1: Ensure that your server has a standard hostname (FQDN or Fully Qualified Domain Name), otherwise set it as follows (in this example, cPanel is the hostname, and routerhosting.lan is the domain name):
# hostnamectl set-hostname cpanel.routerhosting.lan
Step 2: cPanel is written in Perl, ensure that you have Perl installed on your server, otherwise run the command below to install it on your system.
# yum install perl
Step 3: You do not have to run any commands to install it, there is an auto-installer script built for you. All you have to do is download the cPanel installer script with the cURL command, if you don’t have the cURL command installed, first install it like so.
# yum install curl
Step 4: Then download the latest installer script to the home directory.
# curl -o latest -L https://securedownloads.cpanel.net/latest
Now, run the auto installer script. Note that if you have logged in the server using SSH, we strongly recommend running cPanel auto installer script in screen mode, because it takes 40-60 mins to complete the installation depending on your server resources and Internet connection speeds. Wait for the installation process to complete.
# sh latest
How The Auto cPanel Installer Script Works:
CPanel will greatly modify your operating system, and this is how the auto installer script works:
- It examines various packages to ensure that there will be no conflicts and it finds any package conflict, it updates and uninstalls previous packages with yum cPanel on a Fresh OS.
- It also downloads language and base files for installation.
- Installs various Perl modules through CPAN and other required packages with yum.
- It downloads and compiles PHP and Apache with various associated modules.
When the installation completes, you’ll view the output below. You may be asked to reboot the server after installation.
Step 5: After that, you need to complete the installation wizard from its web-based interface and you can access WHM with the following URL:
Now login with user “root” and your password. There are some more clicks remaining to complete the cPanel installation.
Step 6: Next, read the End User License Agreement and accept the terms by clicking on “I Agree/Go Step 2” button to proceed.
Step 7: Then you’ll move to the Setup Networking section, provide your working email address and contact SMS address in the column “Server Contact Email Address” and “Server contact SMS address” respectively.
This will enable cPanel to send all important alerts, notification to this EMail-id (Recommended). You can fill the rest details as well, as required.
Step 8: Next, move to the Hostname section, enter a valid FQDN hostname and Resolver entries for your server in the Networking section as shown in the screenshot below.
You can use Google resolvers in this section if you don’t have your ISP’s resolvers.
Step 9: Afterwards, proceed to select the Main Network/Ethernet Device, an IP available on that device will be considered as the main IP address of your server. And click on “Save & Go to Step 5” button.
Step 10: Now set your server’s static IP address. If you have more than one IP attached with your NIC card and you want to set up a specific IP for your Server’s main IP, you can do that from here, to do so please choose the IP from the drop-down and click on “Go to Setup 4”.
Next, add the “A Entries” for Nameservers & Hostname your server will use. Add Nameservers if you want to use them in the empty fields: ns1/ns2.example.com.
In addition, add an entry for your hostname and nameserver by selecting the check box, as shown in the screenshot below. Then click on the “Save & Go to Step 5” button.
Step 11: Now, configure different services like FTP, Mail, and Cphulk in Step 5 of this web-based wizard.
In FTP configuration, there are two FTP applications, select the one you want to use, but Pure-FTPD is recommended. Choose the disabled option if you want to disable the local FTP server.
In the same wizard, you can select your Mail server to be used for all your mailing activities in future. You can add MTAs like Exim with your cPanel in the future. You can either choose Dovecot which is also recommended or you can choose to disable the mail server by choosing the disabled option.
Step 12: Move on to set “Cphulk” brute force protection which detects and blocks false password attacks activities and block their IP for your server. You can enable/disable and configure it as shown in the screenshot below.
Step 13: Lastly in Step 6, you can enable quotas which helps you to track down the disk space usages. Select “Use file system quotas” and click on “Finish setup wizard” to complete the installation process.
If you don’t use file system quotas then you will not be able to monitor the amount of disk space used by any user or website.
Now you can see some new features of cPanel in its Feature Showcase. In recommended features, you will see cPanelID, which enables a user to login to cPanel with his/her cPanelID. This feature enables a user to login to multiple cPanels with single user id. You can enable this feature by choosing the enable option, otherwise disable it by choosing “No, thank you.”
Once you are done with Installation, WHM’s home page will appear as shown in the screenshot below. You can see that the Home page of WHM is displaying all Control panel option and sidebar with search facility which enables you to search options by just typing their names.
Sometimes, cPanel installer script is not able to update the license because of firewall or resolvers entries and you’ll see trial warning in the page. You can do it manually with the following command:
Remember that Cpanel is for user-level access and WHM is for root-level access, you need to create an account with option available in WHM.