Today we will learn a step-by-step guide on how to install cPanel and WHM on a CentOS VPS or Dedicated Server. cPanel offers a 15-day trial and after that, the user needs to make a commercial purchase to continue using its services.
Install cPanel and WHM on CentOS VPS
Requirements:
- Freshly installed Linux distributions, such as CentOS (minimal installation preferred)
- root permission
- At least 1GB of RAM
- At least 20GB HDD/SSD space
Procedure:
- Log in to root your CentOS VPS or server.
- run
tmux
or
screen
command to open the instance to ensure that the installation process does not interrupt the SSH connection.
Tip- If SSH connection is lost during installation, use
tmux -a
To attach the same example for tmux users.
screen -r to associate with the same detection for screen users.
Update your machine to the latest packages and libraries using the following commands.
yum update -y

If you don’t have a valid hostname set, you can set a temporary hostname using the following command.
The hostname is host.example.com
We are using deepak.basezap.com as the hostname
Run one of the following commands to clone/download the cPanel auto-installation script
curl https://securedownloads.cpanel.net/latest >> cpanel.sh
or
wget -N https://securedownloads.cpanel.net/latest -O cpanel.sh

Grant execute permission to the downloaded script using the following command.
chmod +X cpanel.sh
Run cpanel.sh script
sh cpanel.sh
This script will automatically download and install the necessary packages on your server and set up cPanel and WHM in minutes or hours depending on your machine specifications.
Now you need to open your browser and access WHM’s web UI for setup-wizard. Access using the following URL
https://your-server-ip:2087
OR
https://your-host-name:2087
WHM
NOTE-WHM Panel always runs on HTTPS
The credentials for WHM will be as follows,
Username: root
Password: your_root_password

You can see the setup wizard, and the first page is the license agreement which you have to read and accept the terms if you agree with them, otherwise,
The next page will ask you to fill in contact details like contact email address, contact SMS address and some more, fill them accordingly and proceed to hostname, resolver, and main network column.

Here you need to fill in the valid FQDN hostname, and the other options can be left default unless you know their function.

After going to the next option, it will ask to enter the server IP address information.

Note- IP is hidden for privacy purposes.
In the next step, you will be asked about the nameserver information which is very important. Core functionality of WHM and cPanel is dependent on these NameServers configuration.

We added two name servers ns1.basezap.com and ns2.basezap.com under our configuration and proceed further.
You can read those four steps in the setup wizard for more information about nameservers.

The next step is to configure the FTP feature that your WHM and cPanel will use.
We are using the PureFTPD FTP server.

On the same page, there are a few essential features for bruce-force attacks and you can enable them accordingly.

The next step involves whether to enable file-system quotas; We like to use file system quotas for easy tracking and managing disk space usage.

Finally, the setup wizard ends, and it will take you to the WHM panel if you have a valid cPanel license for the server or if it is started on a 15-day trial.
Here is what WHM Homepage will look like after successful installation.

Here your cPanel and WHM installation is complete and you can configure it and start using WHM. Now you can create separate cPanel accounts for customers who want to use web hosting services. If you want to know how to install Sentora on CentOS 7 then you can read this content.



