Installation of cPanel/WHM
First we need to update Almalinux, so Login as root
and run:
yum -y update
yum -y upgrade
After Update, Reboot your server
reboot
Before installing cPanel you must have Perl installed on your server as cPanel is written in Perl.
Besides, you can also install curl to download the cPanel installation script, To install Perl and curl on Almalinux 8, login as root
user and run the following command.
yum install perl curl
Then Disabled Selinux, Run
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
Then Reboot your server
reboot
Now you will need to set the hostname for your server. A hostname is a FQDN or Fully Qualified Domain Name which will be used to identify your server. For example consider host.domain.com
- this is a FQDN which you can use as your hostname. To change your hostname run the following command
hostname host.domain.com
You can replace host.domain.com
with your hostname. You must own the domain of which your are setting up the hostname.
Next, you will need to change your current directory to /home
directory, run the following command to do this.
cd /home
Download the installation script from cPanel website by executing the following command -
curl -o latest -L https://securedownloads.cpanel.net/latest
Now run the installation script by executing the following command -
sh latest
This will start your cPanel installation, you can now sit back and relax as the installation takes around half hour to complete. Once the installation script is finished you will see the following output:
2022-06-11 08:42:33 222 ( INFO): cPanel install finished in 21 minutes and 23 seconds!
2022-06-11 08:42:33 938 ( INFO): Congratulations! Your installation of cPanel & WHM 11.102 is now complete. The next step is to configure your server.
2022-06-11 08:42:33 938 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
2022-06-11 08:42:33 938 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this.
2022-06-11 08:42:33 938 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
2022-06-11 08:42:33 938 ( INFO): 1. Open your preferred browser
2022-06-11 08:42:33 938 ( INFO): 2. Type https://198.50.190.11:2087 in the address bar
2022-06-11 08:42:33 938 ( INFO): 3. Enter the word root in the Username text box
2022-06-11 08:42:33 938 ( INFO): 4. Enter your root password in the Password text box
2022-06-11 08:42:33 938 ( INFO): 5. Click the Login button
2022-06-11 08:42:33 938 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server.
2022-06-11 08:42:33 938 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support
2022-06-11 08:42:33 938 ( INFO): Thank you for installing cPanel & WHM 11.102!
You can now open your browser and go to https://your-server-ip:2087
to access WHM. Login with username root
and your root account's password. Make sure that you use https
to access WHM in browser. For example if your IP is 192.168.0.85
then you will have to go to https://192.168.0.85:2087