Set up Cpanel in Linux Instance

In this guide, we will explain how to set up cPanel on a Alma Linux instance, providing an easy way to manage your web hosting and applications efficiently.

Understanding cPanel: Your Web Hosting Control Panel

CPanel is a popular web hosting control panel that simplifies website and server management for users. It offers a user-friendly graphical interface (GUI) that enables a wide range of tasks, including:

  • Monitoring web server resources to ensure optimal performance.

  • Domain name management for easy handling of your online identities.

  • File organization to keep your website's backend structured and accessible.

  • Creation of email accounts associated with your domain for professional communication.

Widely favored by hosting providers, cPanel's intuitive design ensures that users, regardless of their technical background, can efficiently manage their web hosting needs.

Installation Requirements:

Suggested Operating system.

  • Minimum of 1 GB RAM (but 2 GB recommended).

  • At least 20GB of free disk space (but 40 GB is recommended).

  • A valid cPanel license.

  • Standard hostname (FQDN or Fully Qualified Domain Name)

  • Perl /Curl

Add Repository for Alma Linux 8

Before installing cPanel on Alma Linux 8, update all the packages.

Import the Alma Linux 8 GPG key

sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux

Verify the key is installed

rpm -q gpg-pubkey

Install the Missing GPG key Manually && Download the GPG key

curl -O https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
sudo rpm --import RPM-GPG-KEY-AlmaLinux

Verify and Retry the installation

sudo yum install unbound-libs -y
sudo yum update -y

Install the CPanel

Now start the Installation:

yum install perl
yum install curl
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
 sh latest

Ensure that executing the sh latest command on cPanel will require 10-15 minutes for installation.

The installation process will take place as shown below:

https://<YOUR_SERVER_IP>:2087
https://<YOUR_SERVER_IP>:2083

You open the browser and access it with the address: https://<YOUR_SERVER_IP>:2087 in Step 3, here you will see the WHM interface as shown below. Please enter your VPS’s root information to log in.

Should the VPS's IP lack a License, you'll be prompted to sign up for a 15-day Trial License to proceed with the installation. Simply click Login, and register for the trial by creating an account and entering your details to activate it.

After registering an account on Trial, please check your registered email for a verification code sent by the firm. Enter this code in the Verification Code section.

After successful registration, you will receive the message: 15-day free Trial License Activated, click Server Setup to set up the next step.

The IP Issued is Dynamic / Random so not all public IPs will provide free Licenses as free licenses are issued only once on any public IP. In this case, you are required to purchase cPanel License

Next, in the Email Address section, enter your administrative email information.

Nameserver: You can name a pair of Nameservers for your server, keeping it simple and easy to remember. This nameserver you can later use as a DNS server of VPS.

After filling in all the information, press Finish to complete the installation.

Configuring WHM

cPanel and WHM should now be installed and ready to be configured for your domain. When you log in for the first time you’ll see a page much like in the example picture below.

Since the login URL is temporary and will expire, your first step should be setting a new root password.

Click the menu icon to open the sidebar and select Change Root Password.

Enter a new password twice, pay attention to the password strength, and then click Change Password to save the change.

Afterward, restart the server from the yellow notification if needed.

When deploying your cPanel cloud server, you had the option to set the hostname. If you need to change the hostname, you can reconfigure it under the Change Hostname option. Check that the server hostname was configured correctly.

Next, confirm the DNS resolvers were configured correctly. Go to the Resolver Configuration page and click the Proceed button.

Your cloud server should automatically receive resolver information from the network but you’ll likely want to include your resolver as well. Add the localhost IP 127.0.0.1 as the primary resolver and the Google DNS addresses to the secondary 8.8.8.8 and tertiary 8.8.4.4 resolvers. Then save the settings by clicking the Continue button.

The cPanel and WHM installation includes a fully featured domain name server for your cPanel-hosted domains. It allows cPanel to automatically manage your domain name records for any web servers you want to install.

Configure your nameserver by going to the Edit DNS Zone page, selecting the DNS zone you wish to change, then clicking the Edit button.

Compatible browsers

As per cPanel official pale they have specifically tested cPanel & WHM with certain browsers to ensure compatibility. Other browsers will likely function but may appear differently or experience issues with certain features.

We develop and test cPanel & WHM to function with the latest versions of the following browsers:

  • Chrome™ (MacOS®, Microsoft® Windows®, Linux)

  • Firefox (MacOS, Windows, Linux)

  • Microsoft Edge (Windows)

  • Safari® (MacOS)

Mobile versions of Firefox, Chrome, and Safari are also compatible with cPanel & WHM.

Last updated