cPanel is a web hosting control panel software developed by cPanel, LLC.

An online Linux-based graphical interface (GUI) used as a control panel to simplify website and server management. cPanel allows you to publish websites, manage domains, organize web files, create email accounts, and more.

With CentOS 7.x going EOL on June 30, 2024 cPanel had to start supporting other Linux distros. Since the CentOS going EOL news hit the community it has put a lot of pressure on cPanel. Due to the news a software provider called CloundLinux went ahead and created AlmaLinux, a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux. The first stable release of AlmaLinux was published on March 30, 2021, cPanel already fully supports AlmaLinux, and the installation process is the same as on CentOS. However cPanel didn’t stop there, CentOS was great but they were on a single point of failure Linux distro, now they have eliminated that by fully supporting Ubuntu. In this blog, we are going through the installation process.

Server requirements.

    1. Operating system and version- Ubuntu 20.04 LTS
    2. Processor– Minimum: 1.1 GHz and Recommended: 2 GHz
    3.  Ram –  Minimum: 1 GB (Recommended 3 GB)
    4. Disk space: Minimum 20GB (Recommended 60 GB)
  1. Static IP Address
  2. FQDN – Fully qualified domain name (We recommend a subdomain which points to the server such as vps.domain.com)Now, login as root to the server. You can do that by executing the following command in command prompt: ssh [email protected] -p22  (change 1.1.1.1 with your server’s IP)By default Ubuntu has a firewall enabled, by executing the below commands you will disable the rules.
    iptables-save > ~/firewall.rules
    systemctl stop firewalld.service 
    systemctl disable firewalld.service

    Update the system by executing the following rules:

    sudo apt update 
    sudo apt upgrade

    Now, we setup the fully qualified domain.

    To check your current hostname, in the console type hostname and hit enter.

    To change it edit the following file /etc/hostname with your favorite editor, we recommend nano, to install nano type the command apt install -y nano

    nano /etc/hostname delete the old FQDN and type your new one.

    Reboot the server by typing reboot

    After the server has booted, login as root and execute the following command:

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

    This part doesn’t require any input from your end if everything is okay. After the installation script has done its job, type your server’s IP or FQDN you’ve setup into your browser, I.E https://vps.yourdomain.com:2087, from there you can login to the web interface and get yourself a license.

    Now, a server by default isn’t secure without a firewall, cPanel’s firewall is called ConfigServer Security & Firewall (csf)

    Before we do install the firewall, we need it to install Perl.

    sudo
     apt install perl

    And now, we will install CSF, to do so execute the following commands, one by one.

    cd /usr/src
    rm -fv csf.tgz
    wget https://download.configserver.com/csf.tgz
    tar -xzf csf.tgz
    cd csf
    sh install.sh
    Next, test whether you have the required iptables modules:
    
    perl /usr/local/csf/bin/csftest.pl

    By default CSF’s testing mode is enabled, that means that all the rules are reset every 5 minutes. We don’t want that, to disable testing do the following:

    cd /etc/csf
    nano csf.conf
    Change the TESTING = “1” to TESTING = “0” and save the changes.
    Now, restart the firewall so the changed we did apply, type csf -r

    The server is now more secure, however we will soon post a new blog that covers the hardening process of a cPanel server running on Ubuntu.

    [Do you need a system admin to install and secure your server? Contact US]

Add comment