cpanel-aws-ec2-security-group_1

how to install cPanel on centos 8

cPanel is a popular, feature-rich and reliable web hosting platform that’s in use worldwide by thousands of web-hosting companies and individuals. With an intuitive and powerful graphical user interface, users can manage databases and website files, set up FTP and email accounts, and control every aspect of their website.

cPanel comes alongside Web Host Manager (WHM) which facilitates and makes web hosting easy for website administrators. Before we proceed to install cPanel and WHM, there are a few important things worth noting:

  • cPanel and WHM should ONLY be installed on a freshly installed Operating system.
  • Once installed, you cannot remove the software. If you wish to remove it, you must reinstall the Operating system.
  • To install cPanel and WHM, you must be logged in as root or as a user with root privileges configured.
  • For commercial hosting, licensing is required for cPanel and WHM. For you to obtain this license you must have a public IP address that is static, not a dynamic or internal IP address.

 

Minimum requirements

For seamless and easy installation ensure your Centos 7 meets the following minimum requirements:

  • As mentioned before, a clean and fresh installation of Centos 7
  • 1 GB RAM
  • Recommended 25 GB hard disk space
  • The server must have a Fully Qualified Domain Name (FQDN)
  • cPanel license which is valid. However, there exists a trial version of 15 days which is automatically activated once you install cPanel. Thereafter, you’ll be required to purchase the license.

Installation of cPanel on Centos 7

      • Since it was written in Perl, you should ensure Perl is installed in your system. Run the command below command
        Yum install perl
      • Set up a FQDN on your server If it doesn’t exist
        hostnamectl set-hostname checkmate.jamie.co.ke

        in the above example, checkmate is the hostname of the server and jamie.co.ke is the domain name.

      • Install screen utility. The installation process can be quite long especially if you are having intermittent internet connectivity. The screen enables to you pause the lengthy process and resume the installation should your connection become weak.
        yum -y screen

        .
        They flag ensures that we do not get prompted by the command line for the installation of packages.

        Thereafter, you can proceed to start a session with the command

        Screen
      • To finally install cPanel and WHM, run the command below to download the script needed for installation.
        wget -N http://httpupdate.cpanel.net/latest
        
      • Run the script
    sh latest

    NOTE:

    When running the script on Centos Minimal install, you may get an error, ‘cPanel does not support NetworkManager installed.’
    To go around this issue, you need to deactivate your network manager in these simple steps:

    systemctl stop NetworkManager.service
    systemctl disable NetworkManager.service
    systemctl enable network.service
    systemctl start network.service
    

    The cPanel installer will run and finally, you’ll proceed to access it using http://ip-address:2087 e.g. http://10.200.30.25:2087

    cPanel

     

     

    Scroll at the bottom and select ‘Proceed to your-ip-address (unsafe)’

    You’ll be presented with this login screen. You’ll be required to login with your root username and password.

  • cpanel login
  • On the next screen you’ll be presented with the User’s agreement page after which you’ll follow the remaining 6 steps and input your server’s details where appropriate.
  • Next, you’ll configure the name servers and DNS settings
  • cPanel
  • Set up the public IP address of the server
  • cPanel
  • Set up the name servers
  • cPanel
  • Define the services that you’ll need e.g. FTP
  • cPanel
  • Finally set up quotas, and accept the changescPanel
  • Finally, you’ll be presented with the components’ dashboard which you can use to tweak various settings to suit your needs.cPanel
whm-upgrade-1

Upgrade WHM/cPanel to latest version

It’s always a good idea to keep your WHM/cPanel installation up-to-date. You can upgrade cPanel via the WHM interface or via the command line.

Upgrade cPanel via the WHM interface:

  1. Connect to WHM as root user
  2. Navigate to cPanel >> Upgrade to Latest Version
    whm upgrade 1
  3. Click the Click to Upgrade button. Select the Force option if you want to reinstall WHM/cPanel.
    whm upgrade 2 

    Forced Reinstall
    This feature allows you to force a reinstall of the cPanel & WHM software, regardless of whether WHM detects that your system is up-to-date. This can be useful if any files are corrupt and you wish to reinstall them.

  4. The process will begin. At the end, you will see a message Upgrade complete
    whm upgrade 3

You can also run a cPanel upgrade at the command line. Use:

[email protected] [~]# /scripts/upcp

and with the –force parameter:

[email protected] [~]# /scripts/upcp --force
instance-launching_1

how to install cpanel on amazon aws

cPanel is a Linux based web hosting control panel that works through a Graphical user interface(GUI). The main advantage of the cPanel server is that it can be easy to install and configure websites and E-mail. It can be even installed on an operating system that is minimally configured but once you install Cpanel server and want to uninstall, it is not going to be an easy process and you have to format the entire server

WHM – Web Host Manager is a tool used by both server administrators as well as resellers. Resellers can access WHM with reseller permissions and privileges reseller account enables them to create and manage sub-accounts and do limited modifications. Any server-level changes require administrator login with which the server administrators use to manage operations including upgrading Apache, Php, and installing perl modules. cPanel server can be accessed with the server’s root password. In the below article let us see the installation procedure of the cPanel Server.

With a very professional team of architects and engineers, EasyDeploy.Cloud team can help you with fast and ease your workload in installing cPanel server with all the required features to start your hosting business with AWS EC2. With our expertise with AWS and cPanel we can also migrate your existing hosting environment to AWS with zero downtime.

If you are new to the Linux command line or if you are completely new to the hosting business we recommend you to contact us for setting it up for you. It just costs you $100/setup.

1. Install a fresh server of your Desired OS(CentOS/RedHat linux/Amazon Linux version 1.x) Amazon Linux 2 is not yet supported hence we used CentOS 7 AMI for our purpose.

2. Choose the instance type either t2.small or t2.medium or t2.large cPanel requires atleast 2GB of RAM to function so, its better to choose t2.small or higher.

3. Change the default storage of 8GB to 60 GB, cPanel requires space.We are setting it to 60GB to accommodate website files as well as backup.

4. Allow the following inbound ports in AWS security group settings (FTP)20-21,(SSH) 22,(HTTP) 80,(HTTPS) 443,(cPanel) 2082-2083,(WHM)2086-2087,(webmail) 2095-2096

5. Now choose either existing key pair or create new key pair .In case of creating new key pair don’t forget to download the keypair and keep it in a safe place. It is required to login to the instance.

6.Now you can launch your Desired instance andonce the instance is launched successfully attach the Elastic IP to the newly created instance. Elastic IP is required to have static IP to the instance.

7. Now you can logininto server using public ip and install cPanel control panel. To install cPanel in AWS EC2 instance you have to download and run the installation script provided by cPanel.

cd /home

wget –N http://httpupdate.cpanel.net/latest

8. cPanel installation will take time to complete once the downloading is completed run the screen command to run the process in the background then run the sh command

chmod +x latest

sh latest

9.After installation completed, you can access your cpanel server through port 2083. In browser type https://<yourserverIP>:2083

10.Now you can access WHM through port number 2087. In browser type https://:2087/

26S1HH2w-YjRYezgyUpWgdQ9snatGo4iEi0i

How to install cpanel/whm on Digital Ocean VPS

Introduction

In this article, I will be taking us through a step by step process of installing a Cpanel/whm on a digital ocean VPS. Note that these steps can be used to install a cpanel/whm on any VPS, but for this post, I will be using a Digital Ocean VPS.

Choosing a reliable hosting platform to use in hosting your projects can be a daunting task. I actually spent a good amount of time going through reviews and features before I finally agreed to go with Digital Ocean.

Why Digital Ocean

  • They have one of the best prices for their VPS — it’s as low as $5 per month.
  • Nice admin UI
  • Very responsive support
  • High performing servers.

Why are we installing cpanel/whm

Cpanel is a web-based server control panel that makes site management a piece of cake. It includes lots of features such as creating emails, server security, domain management, database, and so on, that simplify the work of a DevOps. You can see a demo of how it works by following this link.

cpanel dashboard

Setting up an account with Digital Ocean

First of all, you need to open an account with Digital Ocean. Signing up with this link, https://bit.ly/2JvuZ2V, will get a $10 credit deposited in your account for you to use, and it will also give me some referral credit. It’s really not much, but it’s better than nothing.

If you’re a student or know someone who is, sign up for Github’s Student Pack, and you’ll get $50 extra to use on your Digital Ocean account.

digital ocean signup form

Creating a droplet

Once you are logged into your dashboard, go to the top right corner and click on the create button on the drop-down, then select droplets.

digital ocean dashboard

Droplet is the name given to Digital Ocean servers, which you will use in installing and setting up the cpanel.

It will then take you to a screen for you to choose an image. Click on centOS. We choose that because WHM/cPanel runs on a CentOS server.

Scrolling down, you can choose the size of the droplet that you want. You can choose any configuration that you are okay with, but bear in mind that the minimum configuration for installing a cpanel as stated on the cpanel website is 1GB ram and 20GB disk space.

You can also choose a block storage for your data backup.

Scrolling down, you will be asked to choose a datacenter region. If you’re targeting a specific country with most of your websites, it’s helpful to have a local server close to where most of your users will be accessing your websites.

Further down, you can select additional options. Here I typically go with Private Networking, IPv6, and Monitoring.

Make sure your hostname is HOSTNAME.YOURDOMAIN.COM

Once you finalize, Digital Ocean will start creating your droplet and email you the SSH keys, giving you root access to your server.

Installing Cpanel on your droplet.

Once you get the email, it means your server is now ready and you can start installing the cpanel/whm on it. You need to take note of the following things in the mail:

  • Droplet Name
  • Droplet IP Address
  • Droplet Username (which is going to be root)
  • Droplet Password (which you will be asked to change on the first login)

We need to be able to access our server remotely to run a few commands on it.

For Mac users, you can do this easily by using the terminal. Open up the terminal on your Mac, and type the following command.

ssh [email protected]

The number above should be the droplet IP address that was sent to your email.

It will then prompt you for the password which you can copy and paste and then click enter.

Note that when typing or pasting the password, the field won’t show — so just click on enter after pasting it.

For Windows users, I recommend using PuTTY (which you can download here). It’s free software that you can use to gain shell access to a server.

After installing PuTTY and opening it, this is what you will see.

All you have to add here is your Host Name (or Droplet IP address) and click Open.

You’re going to log in as “root,” and then copy and paste the password you took note of earlier on.

Note: To copy and paste on Windows, simply right-click on your mouse and press enter. PuTTY doesn’t show your password for security reasons, but it’s there.

By default, Digital Ocean is going to ask you to reset your password. Simply enter your current password, then your desired password, and press enter.

Installing cPanel

Installing Cpanel is quite easy, we will just be running a few commands on our server. We begin by preparing our server for cpanel installation by running the following command to install Perl.

sudo yum install perl

After installing perl, we need to take one more preliminary step. cPanel is very picky about making sure that the server that it is installed on has a Fully Qualified Domain Name. To that effect, we need to provide it with a valid hostname. You can input a temporary one and then correct it once cPanel is installed.

hostname  host.example.com

Note: the last command should be your own hostname.

We are now done with the pre-installation, and so we will start the actual panel installation. We start by installing the screen and wget.

sudo yum install screen wget

Once the screen and wget are installed, we can start a new screen session by typing this.

screen

After opening screen, we can then start installing Cpanel using this command.

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

Once this is done, we can start the script by typing the command.

sh latest

The script might take 1 -3 hours to execute, so you just have to be patient until it’s done.

Setting Up your new cpanel account.

Wow, we finally have cpanel installed on the server. The next thing is to configure the basic settings on it.

Accessing your server

To access your server, go to https://YOUR DROPLET IP:2087 on your browser and enter your username and root password.

eg: https://162.345.323.09:2087

Once you are logged in, we need to now add the basic features to WHM and agree to their license terms.

Next, enter your contact email, and move on to the next step. You don’t have to change the other settings.

Skip the next step.

Make sure your Nameserver Configuration is set to BIND, and scroll down to select your nameservers.

Leave your FTP Server settings to be set to Pure-FTPD — this is the default setting on all cPanel systems. Once you’re done, move to the next step.

Select Use filesystem quotas and click Finish.

And you’re done! WHM is now installed. Ready for you to start creating accounts and adding your domains.

Cpanel/whm license

To use cpanel/whm on your server, you will need to pay for a license. But since you are installing the cpanel on a new server with a new IP address, you will have a free trial for 15 days. After that, you will have to add a license or else you will be locked out of the whm.

Purchasing a VPS whm/cpanel license from cpanel will cost you $20 per month. But if you need to save some bucks, you can follow this link to buy the same license for just 15 dollars per month from “buy cpanel,” which is an authorized reseller for cpanel.

buycpanel home page

After clicking on the link, remember to select the whm/cpanel VPS license, and then you can add any addon that you like. Then proceed to making your payment.

It’s really that easy. If you encounter any issue or suggestions while installing it, you can just add a comment and I will surely get back to you.