How to Install WHM and cPanel
First login to the server as root and install perl with the command below.
$ yum install perl -y
Change the server hostname to a standard FQDN (Full Qualified Domain Name), usually just adding 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. Depending on resources and server connection.
$ sh latest
If your server is very fresh, there will be some issues such as being asked to disable NetworkManager and Resolv.Conf.
By disabling NetworkManager and adding the server IP and google IP in the /etc/resolv.conf file.
If 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 to https://ip-server:2087. Username and Password as per login to SSH root.
After login, the first WHM Setup - cPanel & WebHost Manager End User License Agreement will be displayed. Where you need to click "Agree to All" in order to 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 the nameserver. click Finish if it is appropriate.
After that, WHM can be used properly.
To create or add a cPanel account in WHM can be through the Account Function menu -> Create a New Account. Then fill in some forms as below. For settings such as DNS, Mail Routing are 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.
After logging in, you will see the cPanel interface with a basic theme.
If you have reached this step, it means that you can create a cPanel account for the domain you want to add.
MySQL/MariaDB Upgrade
Log in to WHM, then select the MySQL/MariaDB Upgrade menu. However, because the initial installation directly uses MariaDB, what will appear is the latest version of MariaDB, not MySQL.
This screenshot explains that the currently recommended version is MariaDB 10.3. Select that version then next.
Then in Step-2 there will be information about Upgrade Warnings. Check all the System Specific Warnings and General Warnings, then Continue.
If so, the process will be displayed, if the process is complete, it will look like the screenshot below.
CSF (ConfigServer Security & Firewall) Installation
The installation is done via terminal by logging in as root to the server, then running the command below:
$ cd /usr/src $ rm -fv csf.tgz $ wget https://download.configserver.com/csf.tgz $ tar -xzf csf.tgz $ cd csf $ sh install.sh $ vi /etc/csf/csf.conf and $ make TESTING=’0’ $ csf -r
Command csf -r to restart csf and ready to use, the menu can be seen in WHM, then click the ConfigServer Security & Firewall menu as shown in the screenshot below.
To whitelist or include an IP in the firewall allow list, scroll down and enter the IP in the Allow IP address field, then Quick Allow.
To blacklist or enter an IP into the firewall deny list, scroll down and enter the IP in the Block IP address field, then Quick Deny.
PHP 7 Installation
By using the Easy Apache feature, adjust the extension and PHP version you want to use by opening WHM, then clicking the EasyApache 4 menu.
For now, the most compatible version is EasyApache 4.
In the Currently Installed Package click Customize. In Apache MPM, these Apache Modules can be skipped or next without any checklist.
In the PHP Version section, switch to the right to enable the PHP version you want to install, then Next, switch to the right also to enable the PHP extension for each version you want to install.
Then next to the Review section, it will display what you just wanted to install. Click Provision to start the installation process.