Installation of cPanel and WHM in RHEL/CentOS 7

cPanel is a well-known, more reliable and intuitive commercial control panel for web hosting services. It is feature rich and can be used through a powerful graphical user interface to manage all shared, reseller and business hosting services and more.

It comes with a cPanel and Web Host Manager (WHM), which facilitates web hosting for web administrators:

WHM provides a root and reseller access interface, where users can manage configurations related to server administration and account management such as: reseller or hosting package creation, reseller or hosting user account creation, configuration of backup, database configuration, apache configuration.

cPanel offers a user-level access interface to manage a web hosting account on the server allowing the administration of cmo resources: databases, web domains, ftp accounts, directory and other resources that allow user-friendly use experts or unexpected.

cPanel & WHM features

Intuitive and powerful graphical user interface to control your server with WHM.
It is now compatible with EV certificates.
Supports API authentication tokens.
It now offers AutoSSL that supports proxy subdomains.
Allows you to view the SSL status in cPanel.
It supports operations such as backups, migrations and restorations in a very easy and fluid way.
It supports excellent management of mail and DNS servers for the main server and the client account.
Supports administration (start / stop / enable / disable) of services on the server.
It allows you to configure SSL/TLS for all server services and client domains.
Easy integration with Phpmyadmin manages your MySQL databases from the web browser.
Supports brand change.
It allows integration with WHMCS to automate billing management and much more.

In this article we will know how to install cPanel and WHM on RHEL/CentOS 7

cPanel & WHM installation in CentOS 7

Installation Requirements:
Minimal installation of CentOS 7.
Minimum of 1 GB of RAM (2 GB recommended).
20 GB of free disk space (40 GB recommended).
A valid cPanel license/15 days evaluation.

Before continuing with the installation section, you must keep these important points in mind:

Note: cPanel/WHM does not have an automatic software removal system so once you install cPanel/WHM you cannot remove it from your operating system in this case a new installation of the operating system is recommended.

cPanel is a commercial software and requires a license, you can use the trial version during the first 15 days and check the characteristics of cPanel/WHM (which is activated automatically once cPanel is installed), in any case the installation of cPanel / WHM is done completely simply limits your use of cPanel/WHM administration but does not restrict active websites.

1. Disable NetworkManager (Required for cPanel installation)

[root@server ~]# systemctl stop NetworkManager.service
[root@server ~]# systemctl disable NetworkManager.service

2.We position ourselves in: /etc/sysconfig/network-scripts and edit our network configuration.

[root@server ~]# cd /etc/sysconfig/network-script
[root@server ~]# nano MYred

Editamos las siguientes líneas:
NM_CONTROLLED="no"
ONBOOT=yes

3. We enable our network and restart it with the following commands:

[root@server ~]# systemctl enable network.service
[root@server ~]# systemctl start network.service

4. We disable our firewall (Required for cPanel installation). You can enable the firewall after the installation is complete

[root@server ~]# systemctl disable firewalld
[root@server ~]# systemctl stop firewalld

Note: To enable the firewall on our CentOS 7 server it is necessary to configure all the default ports of our cPanel. You can consult the following article to open the necessary ports for cPanel & WHM.

5. Disable selinux permanently by editing the configuration file /etc/selinux/config and changing the line (SELINUX=disabled). You can enable the firewall after the installation is complete

[root@server ~]# nano /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

6. We ensure that our server has a standard hostname (FQDN or fully qualified domain name), otherwise configure it as follows (in this example, server is the hostname and picarazadomains.com is the name of domain):

[root@server ~]# nano /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.200 server.picarazadomains.com server

We also check the configuration of our hostname:

[root@server ~]# nano /etc/hostname
server.picarazadomains.com

7. cPanel is written in Perl, make sure you have Perl installed on your server, otherwise run the following command to install it on your system.

[root@server ~]# yum install perl

8 You do not have to execute any command to install it, there is an automatic installation script created for you. All you have to do is download the cPanel installation script with the cURL command; If you do not have the cURL command installed, first install it this way.

[root@server ~]# yum install curl

9. Download the latest installation script in the home directory.

[root@server ~]# curl -o latest -L https://securedownloads.cpanel.net/latest

11. Now, we run the automatic installation script. Note that if you are logged in to the server using SSH, we recommend that you run the cPanel automatic installer script in screen mode, since the installation takes between 40 and 60 minutes, depending on the server resources and Internet connection speeds.

[root@server ~]# sh latest

Screen Output Capture

Verifying archive integrity... All good.
Uncompressing cPanel & WHM Installer.....
____ _
___| _ \ __ _ _ __ ___| |
/ __| |_) / _` | '_ \ / _ \ |
| (__| __/ (_| | | | | __/ |
\___|_| \__,_|_| |_|\___|_|

Installer Version v00061 r019cb5809ce1f2644bbf195d18f15f513a4f5263
Beginning main installation.
2017-03-04 04:52:33 720 ( INFO): cPanel & WHM installation started at: Sat Mar 4 04:52:33 2017!
2017-03-04 04:52:33 721 ( INFO): This installation will require 20-50 minutes, depending on your hardware.
2017-03-04 04:52:33 722 ( INFO): Now is the time to go get another cup of coffee/jolt.
2017-03-04 04:52:33 723 ( INFO): The install will log to the /var/log/cpanel-install.log file.
2017-03-04 04:52:33 724 ( INFO):
2017-03-04 04:52:33 725 ( INFO): Beginning Installation v3...
2017-03-04 04:52:33 428 ( INFO): CentOS 6 (Linux) detected!
2017-03-04 04:52:33 444 ( INFO): Checking RAM now...
2017-03-04 04:52:33 233 ( WARN):
2017-03-04 04:52:33 233 ( WARN): To take full advantage of all of cPanel & WHM's features,
2017-03-04 04:52:33 233 ( WARN): such as multiple SSL certificates on a single IPv4 Address
2017-03-04 04:52:33 233 ( WARN): and significantly improved performance and startup times,
2017-03-04 04:52:33 233 ( WARN): we highly recommend that you use CentOS version 7.
2017-03-04 04:52:33 233 ( WARN):
2017-03-04 04:52:33 233 ( WARN): Installation will begin in 5 seconds.

At this point the installation of cPanel may take about 20 minutes depending on the speed of your hardware and internet connection.

Note that cPanel will massively modify your operating system, the automatic installation script works as follows:

Examine the operating system to check the system configuration, hardware and packages installed to make sure there are no conflicts, if it finds package conflicts, it updates or uninstalls it and if it finds hardware or configuration conflicts it stops the installation.

Install several Perl modules through CPAN and other necessary packages with yum.
Download and compile PHP, FTP, Apache and other associated modules.

Once the installation is finished we can access the administration panel through the IP address configured on our server and the default port 2087.

https://IPServer:2087

cPanel & WHM Login

If you have any questions, do not hesitate to contact the Picaraza Domains support team 24/7/365.

Was this answer helpful?

Related Articles

Accessing cPanel from a dynamic IP address

If you get logged out from cPanel and get an error ‘The IP has changed’, then it is possible that...

Opening ports in cPanel/WHM

Ports in cPanel/WHM The Linux Firewall is an open source software with which we can allow or...

cPanel installation requirements

Before you install cPanel & WHM or cPanel DNSONLY™, make certain that your system meets all...

Puertos principales de cPanel & WHM

Puertos en cPanel/WHM El Firewall de Linux es un software de código abierto con la que podremos...

How to install IonCube Loaders in cPanel and WHM

What is IonCube Loaders? ionCube Ltd. is a software company based near Canterbury Kent, UK....