Articles

How to Install CPanel & WHM on Linux Ubuntu 22.04

By Rabins Sharma Lamichhane

September 26, 2022

Install CPanel & WHM on linux ubuntu; Through this tutorial, we will learn how to install and configure CPanel & WHM on linux ubuntu 22.04.

Before we install Cpanel and WHM. Cpanel and WHM have some features of their own. We get to know them in a very sort term that what they are. Come Let’s Know CPanel and WHM Features:

Features of CPanel:

Features of WHM:

It is very easy to install and configure Cpanel and WHM in Linux Ubuntu system. Here we learn step by step in a very simple way how to install and configure cpanel and whm in linux ubuntu system

How to Install CPanel & WHM on Linux Ubuntu

Follow the following steps to install and configure CPanel & WHM on Linux Ubuntu 20.04/22.04 system:

Step 1 – Switch Root User

First of all, open terminal and execute the following command on terminal to switch root user in linux ubuntu system:

sudo -i

And also execute the following command on terminal to disable firewall, while installing cpanel & whm on linux ubuntu system:

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

Step 2 – Update Linux Ubuntu System Packages

Now, execute the following command on terminal to update system existing packages:

sudo apt update sudo apt upgrade

Step 3 – Set Hostname

cPanel needs FQDN- Full qualified domain name for proper installation. So, make sure we have set the hostname to the domain name that we are planning to use with it.

For example, we are using demo.rabinsxp.com, edit the file for change or add new hostname.

So, execute the following command on terminal to edit the file, which name is hostname:

nano /etc/hostname

When the hostname file is open, delete the old hostname and set the new hostname.

Then save and close file.

Now, change or add new ip address with hostname, so execute the following command on terminal to for do it:

nano /etc/hosts

Add a line with something like below but change the IP address with server’s address and also the domain name:

192.168.0.2 yourserver.domain.com yourserver

For example:

54.80.23.143 demo.rabinsxp.com demo

Save and close the file.

Step 4 – Install Cpanel/WHM

Once Hostname and IP setup completed, then execute the following command on terminal to install cpanel and whm on linux ubuntu:

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

Wait a few minutes while CPanel and WHM installation is finished

Step 5 – Access WHM/CPanel Web interface

Now, we need to complete the installation wizard from its web based interface and we can access WHM with the following URL:

http://SERVER_IP:2087

Step 6 – Login As root user in WHM

Now whm has been opened on our browser. So we can login into it with root user’s username and password.

Use the following steps to configure whm in linux ubuntu:

Conclusion

Congratulation, we have learned how to install Cpanel and WHM on Ubuntu 20.04/22.04.

In case of anything know for configuration, visit the documentation.

Recommended Linux Ubuntu Tutorials

Images mentioned above related to Linux,Ubuntu are either copyright property of respective image owners.

Share this: