Monday 20 April 2020

How to install cPanel on CentOS

Introduction:- cPanel is a very simple and easy online based control panel to manage your hosting services. The best thing is that non-technical people can also handle all aspects of their web site without any technical skill. With the cPanel you can manage all the important aspects like upload files to your server, install wordpress, connect domain name to your hosting, checking your bandwidth and other usage stats, taking backup of your web sites, setup e-mails for your site, Set up various optimizations and a lot more !!

Quick Tip: You can run this installation on a Cloud Instance or a Virtual Private Server or Dedicated server, and even on a Container such as Docker!

Let's Start:
Login to server as root (SSH).
cPanel is programmed in Perl language. So before starting the installation we need to install Perl if it isn't installed on the server.

yum users should run the following command:

#yum install -y perl

Now you need to set the hostname for your server. Using hostname you can identify your computer in the network. To change your hostname run the following command

#hostname vps.mydomain.com

You can replace vps.mydomain.com with your hostname. You must have to purchase the domain which your are setting up the hostname.

Next, step is you will need to change your current directory to /home directory, run the following command to do this.

#cd /home

It’s time to download the installation script from cPanel official website.

#curl -o latest -L https://securedownloads.cpanel.net/latest

Now, run the below execution script and install the cPanel.

#sh latest

This command will start your cPanel installation, you need to wait around half and hour and can now sit back and relax as the installation takes around half hour to complete. Once the installation script is finished you will see the following type of output:

--------------------------------------------------------------------------------------------------------------------------------

[2020-04-14 10:04:57 +0000] [9869] ( INFO): cPanel install finished in 5 minutes and 35 seconds!

[2020-04-14 10:04:57 +0000] [9869] ( INFO): Congratulations! Your installation of cPanel & WHM 11.86 is now complete. The next step is to configure your server.

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): 1. Open your preferred browser

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): 2. Navigate to the following url using the address bar and enter this one-time autologin url:

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): https://13.127.207.50:2087/cpsess0353546322/login/?session=root%3aroyqyQSyp90CRSSv%3acreate_user_session%2c08904fd92d0fea5549ca256a84ac2b18

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): After the login url expires you generate a new one using the 'whmlogin' command or manually login at:

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): https://13.127.207.50:2087

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server.

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/allfaq for additional support

[2020-04-14 10:04:57 +0000] [9869] ( INFO):

[2020-04-14 10:04:57 +0000] [9869] ( INFO): Thank you for installing cPanel & WHM 11.86!

Removing /root/installer.lock.

--------------------------------------------------------------------------------------------------------------------------------

Congratulations !!

Your cPanel installation is completed and now, you can now open your browser and go to https://your-server-ip:2086 to access cPanel. Login with username root and your root account's password. For example if your IP is 192.168.1.82 then you will have to go to

https://192.168.1.82:2086

Note:-

Once cPanel is installed you can not be uninstall it from server as it does not have any uninstaller. To uninstall you need to reinstall your operating system. cPanel is commercial software and offers a 15 day trial period. Once cPanel is installed on server it is automatically activated.

No comments:

Post a Comment

Maximizing Content Delivery Efficiency: Optimizing Performance in AWS CloudFront

  Unleash Blazing-Fast Content Delivery: Your Guide to CloudFront Optimization Introduction: AWS CloudFront stands as a cornerstone of moder...