How do I install cPanel on CentOS

How to install cPanel WHM on CentOS 7

cPanel & WHM is the most popular and widely used Linux-based web hosting control panel that provides a graphical user interface for managing and hosting multiple websites on a single server. Also known as the WebHost Manager, WHM provides administrator and reseller access to manage settings for server management and account management. cPanel provides user-level access to manage your websites. The latest cPanel & WHM includes support for CentOS, Red Hat Enterprise Linux, and CloudLinux operating systems. cPanel / WHM is a commercial software application that requires a license to work.

In this tutorial you will learn how to install cPanel / WHM on a CentOS 7 server.

requirement

  • A new installation of the CentOS 7 (minimal) server.
  • At least 2 GB of RAM and 20 GB of free space.
  • A static IP address is configured on your server.

To begin

Before you begin, it is recommended that you update your server to the latest version. You can update the server with the following command:

Next, you need to set a host name for the server. The host name must be a fully qualified domain name. You can set the host name of your server with the following command:

hostnamectl set-hostname test.example.com

Next, you also need to disable SELinux on your server. You can turn it off by editing the following file:

Change the following lines:

SELINUX = disabled
SELINUXTYPE = targeted

Save and close the file. Then restart your system for these changes to take effect.

After restarting the system, check SELinux with the following command:

You should see that SELinux is disabled in the following output:

SELinux status: disabled

Install cPanel

cPanel offers an automated installation script for installing cPanel with all necessary components. You can download and install cPanel by simply running the following command:

curl -o latest -L http://httpupdate.cpanel.net/latest && sh latest

The above script takes about 20-60 minutes to complete the installation. After a successful installation you should see the following output:

2019-07-07 01: 36: 441392 (INFO): Congratulations! Your installation of cPanel &
WHM 11.80 is now complete. The next step is to configure your server.
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): Before you configure your server, ensure that your
firewall allows access on port 2087.
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): After ensuring that your firewall allows access
on port 2087, you can configure your server.
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): 1. Open your preferred browser
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): 2. Navigate to the following url using the address
bar and enter this one-time autologin url:
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): https://139.5.237.169:2087/cpsess3438670747/login/
session = root% 3aEFcxHbIjILlL14m2% 3acreate_user_session% 2c8846f458c886541e2ffd7ebc11683ac1
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): After the login url expires you generate a new one
using the 'whmlogin'command or manually login at:
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): https://139.5.237.169:2087
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): Visit https://go.cpanel.net/whminit formore
information about first-time configuration of your server.
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): Visit http://support.cpanel.net or
https://go.cpanel.net/allfaq for additional support
2019-07-07 01: 36: 441392 (INFO):
2019-07-07 01: 36: 441392 (INFO): Thank you for installing cPanel & WHM 11.80!
Removing /root/installer.lock.

cPanel offers a 15-day trial license. So you have 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 global cache for cpanel ... Done

Access the WHM / cPanel web interface

WHM / cPanel is now installed and running on port 2087.

Next, open your web browser and enter the URL https: // your-server-ip: 2087. You will be taken to the WHM / cPanel login screen as shown on the following page:

Enter your root username and password. Then click on the logIn - button. The WHM / cPanel license agreement should appear on the following page:

Now click on All agree . You should see the following page:

Now enter your email address and name server details and click the button Complete . The WHM / cPanel dashboard should appear on the following page:

Next you need to activate the FileSystem quotas. To activate it, click on " clickonactivate “Top right button. You should see the following page:

Next click on the walk - button. Once the FileSystem quota is activated, you should see the following page:

Next, restart the server to enable file system quotas.

Create your first cPanel account

Click the Home button in the WHM / cPanel dashboard. You should see the following page:

Now click the button " Create a new account ". You should see the following page:

Now enter all required information such as domain, username, password, email, subject, activate apache spam, activate DKIM and SPF, select mail routing and then click the button Create click. Once the account has been successfully created you should see the following page:

Now click on " Go to cPanel ". You will be directed to the new cPanel account dashboard as shown on the following page:

With the cPanel dashboard you can now create and manage websites, FTP, email and databases.

Something like that