cPanel & WHM is the most popular and most widely used Linux based web hosting control panel that offers a graphical user interface to manage and host multiple websites on a single server. WHM is also known as a WebHost Manager provides an administrator and reseller level access to manage server administration and account management related settings. cPanel provides user-level access to manage their websites. The latest cPanel & WHM provide support for CentOS, Red Hat Enterprise Linux, and CloudLinux OS operating systems. cPanel / WHM is a commercial software application that requires a license to work.
In this tutorial, we will learn how to install cPanel / WHM on CentOS 7 server.
- A fresh installation of CentOS 7 (Minimal) server.
- Minimum 2 GB of RAM and 20 GB of free disk space.
- A static IP address is configured on your server.
Before starting, it is recommended to update your server with the latest version. You can update the server with the following command:yum update -y
Next, you will need to set a hostname for the server. The hostname must be a fully qualified domain name. You can set the hostname of your server with the following command:hostnamectl set-hostname test.example.com
Next, you will also need to disable SELinux on your server. You can disable it by editing the following file:nano /etc/selinux/config
Change the following lines:SELINUX=disabled
Save and close the file. Then, restart your system to apply these changes.
After rebooting the system, check the SELinux with the following command:sestatus
You should see that SELinux is disabled in the following output:SELinux status: disabled
cPanel provides an automated installation script to install cPanel with all necessary components. You can download and install cPanel by just running the following command:curl -o latest -L http://httpupdate.cpanel.net/latest && sh latest
The above script will take around 20-60 minutes to complete the installation. Once the installation has been completed successfully,
cPanel provides a 15 days trial license. So, you will need to activate it first. You can activate the trial license with the following command:/usr/local/cpanel/cpkeyclt
You should see the following output: Updating cPanel license…Done. Update succeeded.
Building a global cache for cpanel…Done
Access WHM / cPanel Web Interface
WHM / cPanel is now installed and running on port 2087.
Next, open your web browser and type the URL https://your-server-ip:2087. You will be redirected to the WHM / cPanel
Provide your root username and password. Then, click on the Log In button. You should see the WHM / cPanel license agreement in the following page:
Now, click on the Agree to All. You should see the following page:
Now, provide your email address and nameserver details then click on the Finish button. You should see the WHM / cPanel dashboard in the following page:
Next, you will need to enable the FileSystem quotas. To enable it, click on the “Click to enable” top right button. You should see the following page:
Next, click on the Proceed button. Once the FileSystem quota is enabled, you should see the following page:
Next, reboot the server to enable filesystem quotas.
Create Your First cPanel Account
On the WHM / cPanel Dashboard, click on the Home button. You should see the following page:
Now, click on the “Create a New Account” button. You should see the following page:
Now, provide all the required information like, domain, username, password, email, Theme, Enable Apache Spam, Enable DKIM and SPF, Select Mail routing, then click on the Create button. Once the account has been created successfully, you should see the following page:
Now, click on the “Go to cPanel“. You will be redirected to the new cPanel account dashboard as shown in the following page:
You can now create and manage websites, FTP, email, database using the cPanel dashboard.