CAll Us: (+20) 01022593271 Submit Ticket   Login
How to Install cPanel on a CentOS 7 VPS or Dedicated Server

How to Install cPanel on a CentOS 7 VPS or Dedicated Server

cPanel is the most popular web hosting control panel, offering a graphical user interface that allows different users to manage multiple servers with the help of a GUI interface rather than the normal command line.

With the help of this interface, users can easily do most of the tasks that are done on a website’s server including creating emails, uploading files, managing databases, setting cron jobs, and so on.

With cPanel, it is important to note that:

  • The process of installing cPanel is straightforward, but it can a couple of hours to complete.
  • cPanel isn’t a free application. It requires a license fee which is about $14 per month or about $200 per year for VPS server.
  • Once it’s installed, it’s hard to remove it from the server without doing a full server restore. Unfortunately, cPanel doesn’t offer an uninstaller

Prerequisites

  • A Cloud Server, VPS, or Dedicated Server that runs on CentOS 7.
  • A static IP address. Since cPanel cannot function on a dynamic IP address, it requires a new address.
  • Root account to access the server
  • A minimum of 1 GB RAM but you can go for 2 GB RAM which is highly recommended.
  • A minimum of 20 GB Disk Space but it can go up to 40 GB.

Step 1: cPanel Setup

Before you install cPanel on a Cloud Server or Virtual Server, you need to undertake two more steps.

First, ensure you have Perl installed on your server.

  1. $ sudo yum install perl

After Perl is installed, you need to go through one more step. Make sure that cPanel has Fully Qualified Domain Name (FQDN), commonly known as the hostname. It is used to identify your server.  You need to include a valid hostname. Avoiding this step will land you into hostname issues which may prevent the cPanel installer from running.

A common error that may occur is as follows:

  1. 2012-11-01 16:00:54 461 (ERROR): Your hostname () is not set properly. Please
  2. 2012-11-01 16:00:54 462 (ERROR): change your hostname to a fully qualified domain name,
  3. 2012-11-01 16:00:54 463 (ERROR): and re-run this installer.

Fortunately, this error can be resolved. If you have FQDN on your system, run the command below:

  1. $ hostname vps.mydomain.com

You can replace the part vps.mydomain.com with your hostname. Make sure you own the domain.

Now you need to change your current directory and direct it to /home directory. To do so, run the command below:

  1. $ cd /home

Step 2: Installing cPanel

Although the process of installing cPanel has few steps,the process takes a long time depending on the resources used for the service. In most cases, a program known as “screen” is used during the process. It can be useful in case you find out you may have issues with the irregular internet or you want to pause the installation process.
>First, install screen and wget:

  1. $ sudo yum install screen wget

Once you install screen, go ahead and start a new session:

screen

Using the command below, start installing the cPanel with the help of WHM:

  1. $ wget -N http://httpupdate.cPanel.net/latest

Once you download the latest package from cPanel, start the script:

sh latest

This should start the cPanel installation. Be patient as it may take some time to complete.

Once the script has finished installing, you will see the output below:

  1. 2016-06-11 08:42:33 222 ( INFO): cPanel install finished in 21 minutes and 23 seconds!
  2. 2016-06-11 08:42:33 938 ( INFO): Congratulations! Your installation of cPanel & WHM 11.56 is now complete. The next step is to configure your server.
  3. 2016-06-11 08:42:33 938 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
  4. 2016-06-11 08:42:33 938 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this.
  5. 2016-06-11 08:42:33 938 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
  6. 2016-06-11 08:42:33 938 ( INFO): 1. Open your preferred browser
  7. 2016-06-11 08:42:33 938 ( INFO): 2. Type https://198.50.190.11:2087 in the address bar
  8. 2016-06-11 08:42:33 938 ( INFO): 3. Enter the word root in the Username text box
  9. 2016-06-11 08:42:33 938 ( INFO): 4. Enter your root password in the Password text box
  10. 2016-06-11 08:42:33 938 ( INFO): 5. Click the Login button
  11. 2016-06-11 08:42:33 938 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server.
  12. 2016-06-11 08:42:33 938 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support
  13. 2016-06-11 08:42:33 938 ( INFO): Thank you for installing cPanel & WHM 11.56!

The next step is to close out of the screen. Note that even if you close your server, the script will still continue running in the background and it may take one to two hours.

To detach the screen, type the command below:

Cntrl-a-d

To return to the screen, use the command below:

screen -r

This process may take up to two hours.

Once the Installation process has finished, you can go ahead and login to your account by through the IP address is given below and type your username and password:

http://0.0.0.0:2087

Now you’re done with the installation process. Go ahead and create the cPanel user and then login in at http://0.0.0.0/cpanel or http://mydomain.com/cpanel.

Conclusion

There you have it. This tutorial should help you install cPanel/WHM on a VPS or Dedicated Server on a CentOS 7 server. Remember, cPanel allows you manage several websites on a single server with ease.

About the Author

Special offer

-25%

Enjoy your low price hosting services