×
Community Blog How to install cPanel on your Alibaba instance

How to install cPanel on your Alibaba instance

In this tutorial, we will how to quickly set up and configure an Alibaba Cloud ECS instance with cPanel.

By Martin Tumusiime, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud's incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

For the past few years, I have always worked my way up when it comes to setting up a web server instance. The trouble that comes with installing the LAMP stack, migrating your existing website to a new host among others is terrible.

For most beginners, this sounds familiar, setting up an instance on Alibaba cloud or any other cloud provider from scratch is nothing easy. You have to do some extra work such as researching "how to do this and this" which in most cases consumes a lot of time.

In this tutorial, I want to share my quick experience on how to set up and configure your Alibaba instance instantly. I normally use cPanel for this.

The beauty with cPanel is you get to interact with your instance from the graphical user perspective which is a lot easier for beginners. There is a lot you can achieve with having a cPanel on your instance but first let's understand how cPanel works.

Some of the cPanel features include:

  1. Supports operations such as Backup, restore, migrations in a very easy and smooth way.
  2. Intuitive and powerful GUI to control your server with WHM
  3. Offers AutoSSL supporting proxy Subdomains.
  4. Allows you to view SSL in status in cPanel.
  5. Easy integration with PhpMyAdmin to manage your Databases from a web browser
  6. Supports unlimited user accounts, email and FTP accounts
  7. Supports SSL, disk quota, domain redirect, domain alias.
  8. Manage Domains, DNS, subdomains, MySQL, FTP and Email.
  9. Supports Rebranding
  10. Supports API Authentication tokens

Requirements & Prerequisites

  1. A freshly deployed Alibaba Cloud CentOS 7 server instance
  2. Minimum 1GB RAM (2 GB highly recommended)
  3. Minimum Disk Space of 20 GB (but 40GB recommended)
  4. A cPanel license
  5. Perl
  6. Standard hostname (FQDN or Fully Qualified Domain Name)
  7. A non-root user with admin privileges set up on your server
  8. A static IP address of your server (for example 192.160.0.120)

Before installing cPanel, you'll need to access your instance and make sure it meets the requirements specified in the section above. If you don't follow the instructions below properly, you're most likely to run into trouble.

Step by Step guide for cPanel Installation on alibaba instance

If you don't have an instance deployed on your server, go to this article how to deploy an instance on alibaba cloud.Otherwise, in this guide i will use my freshly setup CentOS 7 server to demonstrate how to install cPanel.

Step 1: Install cPanel

The first command allows you to set up a standard hostname (Fully Qualified Domain Name -- FQDN), It's important to set up this if your server doesn't have any. (For example, hostpc is my hostname and example.com my domain name -- use your own details)

# hostnamectl set-hostname hostpc.example.com

Next, ensure you have Perl installed on your server, otherwise install it using the single command below.

# yum install perl

Install cURL command on your CentOS server. The command is an auto script installer that will help you download and install cPanel. Use the cURL command below.

# yum install curl

First install screen and wget: 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.

# yum install screen wget

Once the screen installation is complete, go ahead and start a new session. Use the command shown below.

# screen

Then download and install cPanel to home directory using command below.

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

The single line of command above will change the current working directory to /home, then downloads the latest version from cPanel and execute the installation script as well. Enter Y to continue installation.

Then, enter the command below to start the script.

# sh latest

Note: The installation process takes approximately 1-2 hours depending on your server resources and internet connection speed.

You can now grab a cup of coffee or do something else as cPanel is installed on your server instance.

Your cPanel installation screen will look like something below after the installation process is complete.

1

After finishing the above task, the next step requires us to setup and configure the cPanel via web interface or Frontend. To understand this, just go through the step by step instructions below.

Step 2: Setup cPanel via web interface

  1. In your web browser URL bar, enter your IP address as shown below ( replace for server_ip with your server IP address) and press enter.
    http://server_ip:2087

  2. Now login to cPanel using Root username and password. There are a few more steps to complete installation.

    2

  3. Next, read the End User License Agreement and accept the terms by clicking on "I Agree? And continue to Step 2" button to proceed.

    3

  4. In the Setup Networking section, provide your email address and contact in the fields Server contact Email Address and Server Contact SMS address respectively.

    4

    cPanel uses the email address to send important notifications, alerts and other important information. Change the server's hostname to the required name if not auto filled otherwise leave the rest set to default. You can as well use Google resolvers in the hostname section if you don't have ISP's resolvers.

    5

  5. Next, proceed to select the Main Network/Ethernet Device. In this section, the available IP address of the device while be made the IP address of your server. Click "Save & Go to Set 5".

    6

  6. In this step, you'll be required to setup your servers static IP address. Note if you have more than one IP address attached to your NIC Card, you may want to select the specific IP address from drop down and Tap "Go to Setup 4"

    7

  7. In the following section, Add the A Entries for hostname and nameservers of your server. Add the nameservers in the empty fields e.g ns1.example.com/ns2.example.com

    8

    In addition, you may add an entry for your hostname and name server by selecting the check box as shown below. Click "Save & Go to step 5"

    9

  8. Now, setup different services like Cphulk, Mail & FTP. I recommend you select Pure-FTPD for the FTP configuration. Choose the disabled option if you want to only disable the local FTP server.

    In the same section, I recommend you select your Mail server that will be used for all your mailing activities in the future.

    10

  9. Under Configure cPHulk Brute Force protection, enable this setting. cPHulk detects and blocks false password attacks activities and can also block their IP for your server. You can enable or disable the configurations as shown below.

    11


  10. Lastly, you can now enable quotas which helps you to track down the disk space usages. Select "Use file system quotas" and click on "Finish setup wizard" to complete the Installation process.

    12


Important to Note:
  1. If you don't enable Use file system quotas, then you won't be in position to monitor the amount of disk space used by any website on your hosting.
  2. Once you have installed cPanel on your CentOS server, you cannot remove it. You can only delete it by uninstalling your existing Operating System.
  3. cPanel is not free, it's a commercial software. You require a license to work, however, there is a 14-day trial which is automatically activated on installation. You can install cPanel using the free version and later purchase the software.
  4. cPanel doesn't support Ubuntu servers i.e ubuntu 14.04 or 16.04 etc. (at the time of writing this)
  5. Sometimes cPanel installer script is not able to update your license because of resolvers or Firewall. You can do it manually with single line of command below.
# /usr/local/cpanel/cpkeyclt

Once you're done with each and every step in this guide, you can now access your WHM homepage which looks like something below. Remember you'll be required to purchase a license of cPanel since the software is commercial.

13

cPanel is made for user level access and WHM is for root level access, as such you may need to create an account option in WHM. For my case I created a cPanel account with username root to show you the cPanel view for the root user.

Meanwhile you can access different features by typing their names in the search bar in the sidebar of the WHM homepage.

So I guess that's all. In this article I have discussed how to install cPanel on your Alibaba instance on a CentOS 7 server and covered some initial steps how to configure your cPanel.

1 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments

5334671101555849 October 15, 2019 at 1:08 am

Great post! is there a blog or documentation for SLB (Server Load Balancer) for cpanel? I have not yet successfully used SLB Cpanel in the Alibaba cloud. Thank you.