How to Install WHM, cPanel, PHP and Firewall on CentOS 7 Server September 12, 2022 by Anil Patil

cPanel is one of the most popular Control Panels today, apart from its easy-to-use interface, there are many features that can be used and are very functional. cPanel is usually used by web hosting providers to sell and rent it out to customers. The administrator can also very easily change or add some features through WHM (Web Host Manager).

In this article, We will share how to install WHM and cPanel, Switch MySQL/MariaDB Upgrade, Install CSF (ConfigServer Security & Firewall) and Install PHP 7 on Easy Apache.

cPanel Features

Some of the standard and most used cPanel features are listed below.

  • File Management to manage files.
  • PHPMyAdmin to manage databases.
  • Zone Editor for managing DNS domains on the cPanel side.
  • Backup that can be used as a Transfer Backup to another server.
  • Email with SPF and DKIM support for authentication purposes.
  • SSL as a service for data encryption.

Installation Preparation

Before starting the installation process, you must have the following requirements.

  • Have  a VPS Server  with CentOS 7 OS.
  • Have at least 1 GB of RAM, but it is recommended to have 2 GB of RAM.
  • Have a minimum of 20 GB Disk Space, but it is recommended to have 40 GB Disk Space

Note:

To be able to install WHM on CentOS 7 you must have a license, usually sold on monthly and annual cycles. Also provided by WHM with a trial version (15 days) only.

How to Install WHM and cPanel

First of all login to the server as root and install perl with the command below.

$ yum install perl -y

Change the server hostname to the standard FQDN (Full Qualified Domain Name), usually adding only the “server” subdomain.

$ hostnamectl set-hostname server.dewiweb.com

Download the latest script from the official cPanel website in the home directory.

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

Then run the auto installer script, this process takes approximately 30-60 minutes. Depends on the resource and server connection.

$ sh latest

If your server is still very fresh, there will be some problems such as being asked to disable NetworkManager and Resolv.Conf.

By the way, disable NetworkManager and add server IP and google IP in /etc/resolv.conf file.

When the installation is complete, you will see the output as below.

2019-03-27 02:19:07 1251 ( INFO): 
2019-03-27 02:19:07 1251 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server.
2019-03-27 02:19:07 1251 ( INFO): 
2019-03-27 02:19:07 1251 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support
2019-03-27 02:19:07 1251 ( INFO): 
2019-03-27 02:19:07 1251 ( INFO): Thank you for installing cPanel & WHM 11.78!
Removing /root/installer.lock.

To access WHM, you can go through https://ip-server:2087 . Username and Password according to login to SSH root.

WHM Setup on Server

After logging in, the first WHM setup will appear – cPanel & WebHost Manager End User License Agreement. Where you need to click “Agree to All” so you can go to the next step. The display provided is also new, because usually there will be an Initial Setup display as usual.

Enter a valid Email and Nameserver so that the domain you want to add an account to can be directed to that nameserver. click Finish if it is appropriate.

After that, WHM can be used as it should.

To create or add a cPanel account in WHM, you can go through the Account Function menu -> Create a New Account. Then fill in some forms as below. For settings such as DNS, Mail Routing is ignored, leave the default. Click Create if it is appropriate.

If it has been created, try logging in via https://ip-server:2083 using the username and password that you filled in the Create a New Account form.

cpanel login

After logging in, you will see the cPanel interface with the basic theme.

If you have reached this step, it means that you can create a cPanel account for the domain you want to add.

Conclusion

WHM (Web Host Manager) is very easy to use because of its easy-to-use interface, so beginners who are new to the world of servers will have no trouble understanding the basic settings.

That’s the simple tutorial on How to Install WHM and cPanel on a CentOS 7 Server. Feel free to leave topic ideas you want to read on our blog. Hope this article helps!

Also Read: How to Install phpMyAdmin with Apache on CentOS 7

Leave a Reply