How To Install cPanel / WHM On AlmaLinux 8

Why AlmaLinux 8?

You may say what the reason to use AlmaLinux instead of CentOS 7, or CentOS 8 is. Formerly, CentOS 6 was the most famous operating system to install cPanel, but it reached its lifecycle on November 30th, 2020. Then users moved to CentOS 7, and the lifecycle of CentOS 7 will finish on June 30, 2024. As you know, CentOS 8 is also released.

We all like to use the latest stable version of operating systems, so it seems CentOS 8 should be the best replacement for CentOS 7 to install cPanel. The issue is that Red Hat has announced that they will not support CentOS 8 after December 31, 2021, and it will be upgraded to CentOS 8 stream.

Also, cPanel has announced that they don’t support CentOS Stream. Many were not satisfied with these decisions. In this between, AlmaLinux OS 8 was published, which is developed based on RHEL 8. AlmaLinux 8 is developed by CloudLinux, and the community in the future will develop it. The good news is that AlmaLinux is totally free, and it will be supported until 2029.

Minimum Resource Requirement To Install cPanel On AlmaLinux

  • Buy VPS With AlmaLinux 8 Operating System
  • 1 GB RAM
  • 1 core CPU 1.1 GHz
  • 20 GB Storage
  • Static IPv4

1- Update AlmaLinux 8

Use this command to update the server before installing cPanel. The update process will take some minutes according to your network speed and the value of your resources.

yum update -y

You will be asked yes or not to type y and press enter to proceed with the update.

2- Disable OS Firewall

cPanel recommends disabling the AlmaLinux OS firewall and using third-party firewalls like CSF once the installation was finished. You may disable the AlmaLinux OS firewall using the following commands.

iptables-save > ~/firewall.rules
systemctl stop firewalld.service
systemctl disable firewalld.service

3- Disable SELinux

To make your system compatible with the cPanel installation, you must disable SELinux. To do this, edit the SELinux config file and change the SELINUX parameter from enforcing to disabled. You can edit the mentioned file using the VI editor.

Use the following command to open this file:

# vi /etc/selinux/config

To be able to insert codes inside the file, pres I button and C=change SELINUX=enforcing to SELINUX=disabled

To save the modifications, press the Esc button and type :wq

The final should look like this

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

Reboot the server for the modifications to take effect.

4- Installing Perl

Perl is the language that cPanel has been written with, and if it doesn’t exist on your server, the cPanel installation won’t run.
Run the following command to make sure that Perl is installed on the server.

yum install perl

5- Installing Curl

The Curl is required to download the cPanel installation script; the following command can install the Curl:

yum install curl

6- Add Hostname

Cpanel requests for a hostname that should be in (FQDNFully Qualified Domain Name format. For example, in this topic, we will use myeserver.mydomain.com, and instead of this, you should put your own hostname.

Important Note: I should mention this again. Use your own hostname instead of myeserver.mydomain.com. Something like server.operavps.com.

Here is the command to set it:

hostnamectl set-hostname myeserver.mydomain.com

Disabling Network Manager Service

Network Manager service is used to connect computers; cPanel asks to remove this service or disable it when installing cPanel. In systems that run AlmaLinux 8, the cPanel installation command will automatically disable the Network Manager service and enable the network.service.

 

Installing cPanel With Trial License On AlmaLinux 8

You can use this code to install WHM / cPanel. The cPanel installation process will take some minutes according to your network speed and the value of your resources.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Based on the resources of your server, the installation may take about an hour to 2 hours.

 

Enabling Network Manager Service

Remember to enable this service once the installation was completed with the below commands.

service NetworkManager start
chkconfig NetworkManager on

Note: It is not essential to reboot the server, but you can still restart all installed services through the below command.

reboot

Once the installation was completed, you will face the login URL to login into WHM / cPanel.

 

URL to login to the admin panel of cPanel / WHM: https://serverIP:2087 ( Consider that instead of server IP, you should put your server’s IP, which is this for me: https://48.68.149.135:2087 )

Username to log in to the admin panel of WHM: It is the root or the username that you use instead of the root.

The password to login to the admin panel of cPanel: It is the password of your server.

  • 0 Users Found This Useful
Was this answer helpful?