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
Special note: leading web hosting providers usually offer free c-panel installed with the hosting plan.
- 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.
$ 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:
2012-11-01 16:00:54 461 (ERROR): Your hostname () is not set properly. Please 2012-11-01 16:00:54 462 (ERROR): change your hostname to a fully qualified domain name, 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:
$ 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:
$ 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:
$ sudo yum install screen wget
Once you install screen, go ahead and start a new session:
Using the command below, start installing the cPanel with the help of WHM:
$ wget -N http://httpupdate.cPanel.net/latest
Once you download the latest package from cPanel, start the script:
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:
2016-06-11 08:42:33 222 ( INFO): cPanel install finished in 21 minutes and 23 seconds! 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. 2016-06-11 08:42:33 938 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087. 2016-06-11 08:42:33 938 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this. 2016-06-11 08:42:33 938 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server. 2016-06-11 08:42:33 938 ( INFO): 1. Open your preferred browser 2016-06-11 08:42:33 938 ( INFO): 2. Type https://184.108.40.206:2087 in the address bar 2016-06-11 08:42:33 938 ( INFO): 3. Enter the word root in the Username text box 2016-06-11 08:42:33 938 ( INFO): 4. Enter your root password in the Password text box 2016-06-11 08:42:33 938 ( INFO): 5. Click the Login button 2016-06-11 08:42:33 938 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server. 2016-06-11 08:42:33 938 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support 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:
To return to the screen, use the command below:
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:
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.
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.