If you want to install and setup cPanel and WHM on an AWS EC2 instance server, you need to login to AWS Console Management and launch an instance, then connect to the instance with an SSH terminal, and the cPanel script has to be downloaded and installed using commands, and after that the WHM has to be setup with the help of the web interface.
How to Install cPanel & WHM on Amazon AWS EC2 Server Instance
Steps to download, install, and setup cPanel & WHM on Amazon AWS ec2 instance server:
Step 1 – Login to AWS Console & Launch EC2 instance
Log into the AWS EC2 Management Console and Launch an EC2 instance.
When you set the instance in AWS EC2, also set the ports for cPanel and WHM, such as HTTP:80, HTTPS:443, FTP:21, cPanel:2082–2083, WHM:2086–2087, Webmail:2095– 2096, as shown in the image below:
Step 2 – Connect to Amazon AWS Ec2 Server via SSH
To connect your Amazon AWS ec2 server from the SSH terminal, Open your putty or ssh and connect to from server.
If you are new to connect aws ec2 instance with Windows, ubuntu, and mac systems. A step-by-step guide on How to Connect to ec2 Instance From Putty and SSH Terminal.
Step 3 – Install Required Packages
To sudo yum install perl && curl
command on aws ssh terminal window to install required packages:
sudo yum install perl sudo yum install curl
Step 4 – Download and install the cPanel script
Type cd/home wget –N http://httpupdate.cpanel.net/latest
on ssh terminal window and press enter to download latest installer script for cpanel:
cd/home wget –N http://httpupdate.cpanel.net/latest
Next type chmod +x latest sh latest
command on ssh terminal window to start the installation of cpanel on aws ec2 server:
chmod +x latest sh latest
Now wait for some time, the cPanel installer script will install cPanel and all its related packages in your system.
Before setting up WHM and accessing cPanel, change the password of your root user by typing the following command sudo passwd root
in a terminal window:
sudo passwd root
Step 5 – Set up a hostname
After that, set the hostname with your domain name using the command hostname cpanel.yourdomainname.com
on the ssh terminal window:
hostname cpanel.yourdomainname.com
In this command, Replace yourdomainname.com
with your domain name.
Step 6 – Setup WHM using Installation Setup Wizard
Next type https://SERVER_IP:2087
URL on browser to setup whm using installation wizard:
http://SERVER_IP:2087
And follow these steps to configure whm:
- Now a screen will open on the browser. In which you have to login with root user.
- Like login with root user. So the End User License Agreement and accept the terms have to be accepted.
- To setup the Server Contact Email Address and Server Contact SMS Address.
- Move 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”
Step 7 – Access Cpanel AWS EC2 Server
Now the cpanel and whm installation is finished, you need to type http://SERVER_IP:2083
on the web to get access to cPanel:
http://SERVER_IP:2083
Conclusion
Congratulations! cPanel and whm are installed and setup on amazon aws ec2 instance server via ssh terminal window.