Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home AWS

Install cPanel & WHM on AWS EC2 Instance

by Cloudbooklet
4 years ago
in AWS
Install Cpanel &Amp; Whm On Aws Ec2 Instance
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

Install cPanel & WHM on AWS EC2 Instance with CentOS 7 and set up Email and Security using Web Host Manager (WHM). This latest version simplifies the WHM setup in just two clicks compared to the installation of old cPanel version. cPanel is a server management software for website owners which comes with a 15-day […]

ADVERTISEMENT

Install cPanel & WHM on AWS EC2 Instance with CentOS 7 and set up Email and Security using Web Host Manager (WHM). This latest version simplifies the WHM setup in just two clicks compared to the installation of old cPanel version.

cPanel is a server management software for website owners which comes with a 15-day trial.

Click here to activate cPanel License

ADVERTISEMENT

Steps to install cPanel and WHM

  1. Create an EC2 Instance
  2. Setup Route 53 DNS
  3. Configure Security Group
  4. Set up Hostname on AWS
  5. Install cPanel
  6. Agree to Terms and Conditions
  7. Setup Email in WHM
  8. Activate cPanel

Cpanel and WHM can also be installed on other cloud platforms. You can choose anyone from the below.

Here are some options.

PlatformMachine TypeCost (Monthly)
Digitalocean4GB RAM – 2vCPU$20
Google Cloud PlatformStandard 3.75 GB RAM$25
Amazon Web ServicesA1- Large 4 GB RAM$35

Check how to install cPanel on Google Cloud Platform.

ADVERTISEMENT

You might also like

How To Install Memcached With Apache-Php

How to Install and Configure Memcached with Apache and PHP

2 years ago
Setup Geoip Block Using Apache

How to Setup GeoIP Block using Apache

2 years ago

Create an EC2 Instance

Launch a new EC2 Instance with CentOS 7 Amazon Machine Image.

Choose atleast t2 micro instance type.

ADVERTISEMENT

Add 40 GB of Storage to your root volume.

Configure Security Group by adding rules for these custom ports.

ADVERTISEMENT
  • SSH with source anywhere (You can also restrict it)
  • HTTP with source anywhere
  • HTTPS with source anywhere
  • DNS (UDP) with source anywhere
  • DNS (TCP) with source anywhere
  • Custom TCP 2077 with source anywhere
  • Custom TCP 2078 with source anywhere
  • Custom TCP 2082 with source anywhere
  • Custom TCP 2083 with source anywhere
  • Custom TCP 2086 with source anywhere
  • Custom TCP 2087 with source anywhere
  • Custom TCP2096 with source anywhere
  • Custom TCP 3306 with source anywhere
  • Custom TCP 2525 with source anywhere

Create an instance by creating a new pem key to access your instance using SSH. Keep this key safe, without this key you cannot access the instance.

Setup Route 53

Create a new DNS Hosted zone for you domain name and update the nameservers of Amazon on your domain name.

ADVERTISEMENT

In your DNS manger create a new A record with the name cpanel which points to the Public IP Address of the instance.

You can check your DNS records here by entering cpanel.yourdomain.com

Once everything is in place you can go ahead and install cPanel.

Install cPanel

Access your EC2 Instance with the PEM file you just downloaded.

Once you are connected to you instance enter the following commands one by one.

sudo -s
yum update
yum install perl
yum install wget

Then set the hostname with your domain name. Replace yourdomainname.com with your domain name.

hostname cpanel.yourdomainname.com

Download latest cPanel and install it by running the following command.

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

It will take around 30 – 40 min to complete the install. Don’t close the terminal until the setup is completed.

Once the setup is completed, you can set the root password by executing the following command.

passwd

Save your password safely, you will need that to login to your WHM.

Set up Hostname in AWS

AWS Instance won’t preserve the hostname (cpanel.yourdomainname.com) you set and changes it to default hostname automatically, so this may result in a locked cPanel & WHM license. To preserve the hostname follow the below simple steps .

cd /etc/dhcp/dhclient-exit-hooks.d/
sudo nano set-hostname.sh

Paste the following contents and hit Ctrl+X followed by Y to save the file. Remember to replace yourdomainname.com with your domain name

#!/bin/sh
hostname cpanel.yourdomainname.com
/scripts/fixetchosts

Set correct permissions to the file you created

chmod 744 set-hostname.sh

That’s all now your cPanel is installed and ready to finish the WHM setup

Setup WHM

Open your browser and navigate to https://cpanel.yourdomainname.com:2087 . At this point, some browsers show a warning message about HTTPS and don’t allow you to visit the WHM page. In this case, you can use your IP Address instead of the domain name (https://PUBLIC_IP_ADDRESS:2087). It will take some time for the SSL certificate to get issued by cPanel.

59De4Cc3 Whm Login

Enter username as root

Enter the password you created by running the command passwd

Now you will be logged into your WHM.

Click Agree to All.

Provide your email address.

4B1D9C33 Cpanel Whm Setup 2

Click Finish

Now you will be taken to the WHM home page.

Install Cpanel &Amp; Whm On Aws Ec2 Instance

Setup Email in WHM

In AWS port 25, which cPanel & WHM utilizes for email is not open. So you need to create an account with Mailgun or Sendgrid and integrate with WHM for emails or Configure Amazon SES.

Allow SMTP on Port 2525

Go to Service Configuration >> Service Manager

Tick both boxes next to Exim Mail Server (on another port)

Change Allow exim to listen on a port other than 25 to 2525

Click Save

Email Configuration

As the standard email port is blocked in Google Cloud, you need to configure a third party email service provider to send emails. Here we can use Mailgun to configure emails in cPanel.

Make sure you have these DNS records.

A record pointing to mail.domain.com

MX record with 0 priority pointing to mail.domain.com

Mailgun Configuration

Go to Service Configuration >> Exim Configuration Manager.

Click Advanced Editor tab.

In daemon_smtp_ports enter 465 : 25 : 587 : 2525

In the Section: AUTH box enter.

mailgun_login:
driver = plaintext
public_name = LOGIN
hide client_send = : Default SMTP Login : Default Password

In the Section: PREROUTERS box enter.

mailgun:
driver = manualroute
domains = ! +local_domains
transport = mailgun_transport
route_list = * smtp.mailgun.org::2525 byname

In the Section: TRANSPORTSTART box enter.

mailgun_transport:
driver=smtp
hosts_try_auth = smtp.mailgun.org

Activate cPanel

cPanel is a subscription based software, you can activate your license.

Save the configurations, that’s everything about cPanel & WHM on AWS.

Tags: AWSCentOScPanelEC2WHM
Share12Tweet7SendShare
Cloudbooklet

Cloudbooklet

Comments 4

  1. Avatar Of Chuck Chuck says:
    2 years ago

    Shouldn’t you also describe how to disable SELinux? Many distro images come with it enabled.

    Reply
  2. Avatar Of Tinku Sharma Tinku SHARMA says:
    3 years ago

    In cPanel no option for installing wordpress, i’m not happy with this…

    Reply
    • Avatar Of Bryan Veloso Bryan Veloso says:
      2 years ago

      That’s optional. You need to install Softaculous via SSH to have that WordPress install feature.

      Reply
  3. Avatar Of Ali Raza Marchal ALI RAZA MARCHAL says:
    4 years ago

    All thinks working fine but not an email i have tried the sendgun but did not able to achive,

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Setup Ci/Cd Workflow With Github Actions

Setup CI/CD Workflow with GitHub Actions

2 years ago
How To Install And Setup Csf

How to Secure your Ubuntu server with CSF Firewall

2 years ago
Setup A Load Balanced Wordpress Website On Aws Ec2

Setup a Load Balanced WordPress Website on AWS EC2 – Part 2

3 years ago
Setup A Load Balanced Wordpress Website On Aws Ec2

Setup a Load Balanced WordPress Website on AWS EC2 – Part 1

3 years ago

Follow Us

Trending Articles

Tiktok

5 Best TikTok Private Account Viewer in 2023

September 18, 2023

10 Best AI Prompts for Writers to Improve Website SEO

5 FREE AI Horoscope Online – Personalized Way to See Your Future

5 Free AI Soulmate Maker: Create Your Perfect Match

How to Become an AI Trainer: Skills, Salary, and Career Opportunities

10 Best Minecraft Server Hosting Providers in 2023

Popular Articles

Personal Ai Assistant With Localgpt

How to Create a Personal AI Assistant with LocalGPT

September 12, 2023

Best 5 AI Illustration Generators for All Your Creative Needs

Microsoft Editor vs Grammarly: Which is the Best Grammar Checker?

7 Best AI Album Cover Generators to Create Stunning Artwork

Google Dark Web Report: Protect Your Personal Information

7 Best AI Photo Editor You Need to Try Online Free

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.