Follow us in our comprehensive tutorial on how to build your own WHM / cPanel cloud hosting on Amazon AWS EC2. This part takes less than 10 minutes and we will cover WHM installation process.
CLOUD HOSTING: DO IT YOURSELF
Build Your Own cPanel Cloud Hosting with Amazon AWS: Part 2
by Cloud Hosting Today
April 2, 2017
We have learned how to deploy cloud VPC on Amazon EC2 in first part of our Tutorial. Now it’s time to install WHM / cPanel on our cloud instance.
What are the advantages of cloud cPanel:
- Run as many websites as you wish.
- Create and manage cPanel accounts on your own.
- Distribute resources between cPanel account management.
- Create and manage cPanel accounts to provide cloud web hosting services.
- Create reseller cPanel accounts to earn more.
3. Click on Client key manager button.
Remember that key pair you’ve downloaded in Step 22 of Part 1 of this tutorial? It’s time to use it in order to get SSH access to your cloud machine .
8. Now, go back to Amazon EC2 Dashboard and copy to clipboard (or just take a note of) the Elastic IP address of your VPC. Not sure about what is Elastic IP address? Please read Step 4 of Part 1 of this tutorial.
9. Paste (or just type in) your Elastic IP address in Host field of Bitvise Client.
10. Enter centos as Username.
11. Select publickey as Initial method.
12. Choose previously imported Client key.
13. And click Login button.
14. Now wait for connection to establish and click Accept and Save button. Once done, you will see a Terminal window.
It’s a Terminal window. Now you are connected to your Amazon EC2 cloud instance via SSH. It’s time to get your WHM installed!
Looks scary? However, SSH is convenient and simple method to run commands on your cloud server. Don’t be afraid, we use it once for WHM installation only. There is a good chance that you’ll never need it again.
Now we run all the necessary commands for WHM /cPanel installation on your cloud server. WHM installation takes some time, so be patient.
Step 2. Install WHM
Enter this commands in exact order as shown below.
- Type sudo su and press enter.
- Type yum install perl and press enter. Then, type y and press enter. Once again type y and press enter.
- Type sudo yum install wget and press enter. Then, type y and press enter.
- Type cd /home and press enter.
- Next, type wget -N http://httpupdate.cpanel.net/latest and press enter.
- Then type sh latest and press enter.
- Now, get yourself some coffee or tea, relax and wait 20 minutes for cPanel / WHM to install.
- You will get message once installation completed as shown on the illustration to the right.
- Next, type passwd root and press enter.
- Type the password you wish to use to login to your cloud WHM
- When finished, copy https address of your WHM cloud server as shown and paste it into address bar of your browser.
It’s time to configure your cloud WHM. Next step of our tutorial will show you how to configure your server properly for cloud web hosting.
This is WHM welcome screen. Your username is root. Enter the password you have entered with passwd root command in previous step.
TIP: Some browsers might warn you about insecure connection. You don’t have to worry here, that happens because you don’t have SSL certificates installed yet. In that case, just click Advanced button and allow the connection.
Step 3. Configure WHM
Once logged in, please follow arrow tags in exact order as shown on the illustrations to the right.
- Here click I agree.
12. TheWHM dashboard now is in front of you. Now it’s time to Reboot your cloud server
13. Now click Proceed button to gracefully reboot your cloud server.
Before the next step, please allow 60 seconds for your cloud server to restart.
Step 4. Configure cPanel account
Once server rebooted, you will have to login to your WHM again using your elastic IP address and the port 2087 (see Step 2.11): https://elastic_ip_address:2087
- Proceed to Account Functions > Create a new Account.
- Afterward, enter your domain name. In fact, that could be your website name.
- Next, pick a username for that cPanel account. For instance, your domain name is OK for that purpose.
- Then, enter a password you wish to use to login in that particular cPanel account.
- Confirm that password
- Enter an email address for password recovery and account notifications.
7. Afterwards, scroll down to Mai Routing Settings and set them to Automatically Detect.
8. Then click Create button.
Once your cPanel account is created it’s time to point your domain NS records to your cloud server. You can do that in your domain registrar account, for instance.
Just set NS records to your Elastic IP address and allow up to 24 hours for DNS to propagate. Fortunately, that happens much faster, so you will be to access your website in 10-15 minutes or so.
What are NS records? In simple words they are the instructions on where to direct your website visitors. Once you set them to Elastic IP address of your cloud server, each and every user will directed there.
Moreover, you can take an advantage on cloud technology to direct your website visitors to the cloud server through additional layer of security. At this point, we recommend Cloudflare for that purpose.
Additionally, that approach can make your website much faster and the traffic more manageable. We will cover this cloud solution in our next article.