DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on • Edited on

Setup WHM/CPanel on AWS EC2

It is recommended to use AlmaLinux OS for WHM

1) Select new EC2 and choose CloudLinux 8 cPanel or cPanel&WHM for Ubuntu from AWS Marketplace

2) Keep rest of the as they are, make sure download you pem file before launch

3) Once EC2 is create, visit the security group and add port 22, 2087 and 2083 to inbound rules.

4) Connect with WHM via SSH, open terminal and navigate where you store .pem file and run following command:

ssh -i "[pem-filename].pem" [root-user]@[Public IPv4 DNS]
Enter fullscreen mode Exit fullscreen mode

[root-user]: In case of Cent OS your root-user will centos or ubuntu or it will be ec2-user.

[Public IPv4 DNS]: you can get from aws instance summary page

5) Once you're connected, get administrator access as root via following command:

sudo su
Enter fullscreen mode Exit fullscreen mode

6) Change password for root user

passwd
Enter fullscreen mode Exit fullscreen mode

7) Login to WHM, now you can visit https://[public-p]:2087 and can login via root username and password you entered in step 5.

8) Add a A record for the host name you want, eg if you want aws.domain.com as you hostname for whm, then add a A record in your domain control panel.

9) Update the hostname in your whm

Resources

Top comments (0)