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:
- Domain management
- Email administration
- Security settings
- Databases and files
- Log files
Features of WHM:
- User administration
- Server monitoring
- Backups and moves
- Unique branding
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 in Linux Ubuntu 22.04 Terminal
Steps to install and configure CPanel WHM in Linux Ubuntu 20.04/22.04 system using terminal or command line:
- Step 1 – Switch Root User
- Step 2 – Update Linux Ubuntu System Packages
- Step 3 – Set Hostname
- Step 4 – Install Cpanel/WHM
- Step 5 – Access WHM/CPanel Web interface
- Step 6 – Login As root user in WHM
Step 1 – Switch Root User
First of all, open terminal or command line and execute the following command into it 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.tutsmake.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.tutsmake.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:
- Now a screen will open on the browser. In which we have to logged with root user.
- Then End User License Agreement and accept the terms have to be accepted.
- To setup the Server Contact Email Address and Server Contact SMS Address.
- And also, we can change or modify to the Hostname section, enter a valid FQDN hostname and Resolver entries for server
- Now select Main Network/Ethernet Device and IP available on that device will be considered as the main IP address of server
- To set servers static IP address.
- To set FTP configuration for server
- To enable quotas and click on “Finish setup wizard”
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.