Cookie Consent by Free Privacy Policy Generator 📌 Deploy cPanel & WHM on AWS EC2 Instance

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 Deploy cPanel & WHM on AWS EC2 Instance


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

  • cPanel & WHM is a web hosting control panel software that allows website owners, system administrators, and resellers to manage their websites and servers through a user-friendly interface. cPanel provides an easy-to-use graphical interface for managing various aspects of web hosting, such as creating email accounts, managing domains, uploading files, creating databases, installing applications, and monitoring server performance.

  • WHM (Web Host Manager) is a separate administrative interface that comes with cPanel. It allows system administrators and web hosting resellers to manage multiple cPanel accounts on a single server or across multiple servers. With WHM, you can create and manage hosting packages, set up new cPanel accounts, monitor server health and resource usage, and automate server backups and updates.

  • Together, cPanel & WHM provide a complete web hosting solution for both individual website owners and web hosting providers. They are widely used in the industry due to their ease of use, reliability, and comprehensive feature set.

Implementation

Creating an EC2 INSTANCE and Choosing CentOS 7 AMI

a. Open the AWS Management Console. When the screen loads, enter EC2 in the search bar, then select EC2 to open the service console.

Image description

b. Choose the Launch instance button to open the instance creation wizard.

Image description

c. On the first page, enter Web Hosting (cPanel & WHM) as your instance name.

Image description

d. Next, choose an Amazon Machine Image (AMI). The AMI you choose will determine the base software that is installed on your new EC2 instance. This includes the operating system (Amazon Linux, Red Hat Enterprise Linux, Ubuntu, Microsoft Server, etc.), and the applications that are installed on the machine.

Many AMIs are general-purpose AMIs for running many different applications, but some are purpose-built for specific use cases, such as the Deep Learning AMI or various AWS Marketplace AMIs.

CentOS 7 image is the Official CentOS 7 x86_64 HVM image that has been built with a minimal profile, suitable for use in HVM instance types only, so choose CentOS 7 (x86_64) - with Updates HVM after make search on AWS Marketplace AMIs in the AMI selection view.

so write CentOS 7 on search bar then click Enter

Image description

e. You will find the first image, choose it and press on Select

Image description

f. Read overview and all details about AMI then click Continue

Image description

g. You will return to the AMI Section and you will find that the image has been selected.

Image description

Choosing an instance type

Scroll down to select an EC2 instance type. An instance type is a particular configuration of CPU, memory (RAM), storage, and network capacity.

AWS has a huge selection of instance types that cover many different workloads. Some are geared toward memory-intensive workloads, such as databases and caches, while others are aimed at compute-heavy workloads, such as image processing or video encoding.

Amazon EC2 allows you to run 750 hours per month of a t2.micro instance under the AWS Free Tier.

a. Select the t2.micro instance.

Image description

Configuring an SSH key

You will see a details page on how to configure a key pair for your instance. You will use the key pair to SSH into your instance, which will give you the ability to run commands on your server.

a. Open the key pair (login) section and choose Create new key pair for your instance.

Image description

b. Give your key pair a name. Then choose .ppk in Private Key file format to can use with PuTTYThen. Then choose the Create key pair button, which will download the .ppk file to your machine. You will use this file later.

Image description

c. You will return to Key pair (login) Section and you will find that Key has been selected.

Image description

Configuring a security group and launching your instance

You need to configure a security group before launching your instance. Security groups are networking rules that describe the kind of network traffic that is allowed to your EC2 instance. You want to allow traffic to your instance:

  • SSH traffic from all IP addresses so you can use the SSH protocol to log in to your EC2 instance and configure WordPress.
  • HTTPS traffic from all IP addresses so that users can view your WordPress site Secured.
  • HTTP traffic from all IP addresses so that users can view your WordPress site.

a. To configure this, select Allow SSH traffic from Anywhere and select Allow HTTPS & HTTP traffic from the internet.
then Click on Edit

Image description

b. Click on Add Security group rule to add group rule.

Image description

c. First Security Group: In Port Range write 2087 and in Source type select Anywhere this for open WHM Dashboard Port.
Then Click on Add Security group rule to add another group rule.

Image description

d. Second Security Group: In Port Range write 2083 and in Source type select Anywhere this for open cPanel Dashboard Port.

Image description

Configuring storage on instance

a. Here we can increase the storage space for the Root volume and also can be added more volume storage.

Image description

Launch

It is now time to launch your EC2 instance.
a. Choose the Launch instance button to create your EC2 instance.

Image description

b. Wait for instance to launch.

Image description

c. You have successfully launched your EC2 instance and You can get Public IP.

Image description

SSH into your EC2 instance to know login information

You will use SSH to connect to your EC2 instance and run some commands.

a. Go to the EC2 instances page in the console. You should see the EC2 instance you created for the WordPress installation. Select it and you will see the Public IPv4 address and the Public IPv4 DNS in the instance description.
Click on Copy icon to copy public ip

Image description

b. Open PuTTY appliction and paste public ip in Host Name (or IP address).

Image description

c. Click on + the one next to SSH in Category list.

Image description

d. Then click on Auth.

Image description

e. In Private Key file for authentication, Click on Browse

Previously, you downloaded the .ppk file for the key pair of your instance. Locate that file now. It will likely be in a Downloads folder on your desktop.

open this .ppk file

Image description

f. Click on Open.

Image description

Configuration for CentOS to install cPanel & WHM

a. You should see the following in your terminal to indicate that you connected successfully.

then you will log in with centos (centos is deafult).

Image description

b. Enter this command to change password

sudo passwd

Image description

c. Enter this command to be root user

su root

Image description

d. Enter Password to be root user (Password you added a while ago in a sudo passwd step).

Image description

e. Enter this command to update image

yum update

Image description

f. Enter y to accept download Package.

Image description

g. Enter this command to install perl package

yum install perl

Image description

h. Enter y to accept download Package.

Image description

i. Enter this command to install wget package

yum install wget

Image description

j. Enter y to accept download Package.

Image description

k. Enter this command to install nano package

yum install nano

Image description

l. Enter y to accept download Package.

Image description

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

hostnamectl set-hostname cpanel.yourdomainname.com

Image description

n. Download the latest installation script from cPanel's website by running the following command

curl -o latest -L https://securedownloads.cpanel.net/latest

Image description

o. Once you have downloaded the installation script, run the following command to start the installation process

sh latest

Image description

p. The installation process will now begin. Follow the on-screen instructions to complete the installation.

Image description

q. Make reboot for server, run the following command

reboot

Image description

WHM & cPanel setup

a. back to EC2 Instance Dashboard and select EC2 then Copy Public Ip.

Image description

b. Once the installation is complete, you can access the WHM interface by visiting https://your-server-public-ip:2087 in your web browser then click on Advanced

Image description

c. Click on Proceed to ... (unsafe)

Image description

d. WHM Login Page Open.
On the WHM login page, enter the "root" username and the password you set during the instance launch process then click on Login.

Image description

e. Click on Agree to All.

Image description

f. Click on Log in to log in to cpanel store.

Image description

g. Click on Create an Account.

Image description

h. Enter email address then click on the approval box (I agree ...) then click on Create Account.

Image description

i. Click on Allow Access.

Image description

j. After recieve verification code on email copy it and enter it in WHM then click on Verify My Email.

Image description

k. Click on Server Setup.

Image description

l. Here you can add Nameservers and setup domain or click on Skip and edit in it later.

Image description

m. Now you will be taken to the WHM home page.

Image description

n. In Search Tools write Create and click on Enter to make Search then click on Create a New Account to use it to open Cpanel Login.

Image description

o. Enter all data about account you need to create then click on Create and this data will use to Log in Cpanel dashboard.

Image description
Image description

p. Now you can access the cPanel interface by visiting https://your-server-public-ip:2083 and enter username and password to login.

Image description

That's it! You now have cPanel & WHM installed on your AWS EC2 instance. From here, you can manage your server, create hosting accounts, and more.

...



📌 Deploy cPanel & WHM on AWS EC2 Instance


📈 83.7 Punkte

📌 Deploy an EC2 Instance in AWS, connect to it and install nginx


📈 51.8 Punkte

📌 How to Select the Right EC2 Instance – A Guide to EC2 Instances and Their Capabilities


📈 49.42 Punkte

📌 Azure Virtual machine & AWS EC2 Instance


📈 42.82 Punkte

📌 The Why-What-How of AWS EC2 Instance Metadata Service update (IMDSv2)


📈 40.46 Punkte

📌 How to add swap to AWS EC2/Lightsail Amazon Linux instance


📈 40.46 Punkte

📌 How to Fetch the AWS EC2 Instance ID


📈 40.46 Punkte

📌 AWS EC2 Instance Store vs EBS


📈 40.46 Punkte

📌 How to Setup a Kubernetes Cluster on an AWS EC2 Instance?


📈 40.46 Punkte

📌 How to Create EC2 Instance (Ubuntu 22.04) on AWS and Connect Via SSH using PEM


📈 40.46 Punkte

📌 Get Started with Virtual Machines: A Step-by-Step Guide to Setting up an EC2 Instance on AWS.


📈 40.46 Punkte

📌 Explore AWS Cloud9! Environment Creation with EC2 Instance


📈 40.46 Punkte

📌 Choosing the Right AWS EC2 Instance: Avoiding Common Pitfalls


📈 40.46 Punkte

📌 Optimizing Your AWS EC2 Windows Instance: A Comprehensive Guide to Extending Root Volumes and Adding Extra Storage


📈 40.46 Punkte

📌 Installing Ansible on AWS EC2 Instance


📈 40.46 Punkte

📌 How To Install Oceanbase on an AWS EC2 Instance


📈 40.46 Punkte

📌 How to Connect to Your AWS EC2 Instance with Visual Studio Code


📈 40.46 Punkte

📌 How To Understand and Choose Your First EC2 Instance on AWS


📈 40.46 Punkte

📌 How to run commands remotely on an EC2 Instance with AWS Systems Manager


📈 40.46 Punkte

📌 Pros, Cons, and traps of EC2 Instance Start and Stop Schedules with AWS Lambda


📈 40.46 Punkte

📌 Step-by-Step Guide to Setting Up Your First AWS EC2 Instance


📈 40.46 Punkte

📌 How to Deploy Your Container into AWS EC2 with ECS


📈 35.76 Punkte

📌 How to Deploy GitLab on AWS EC2 With Walrus


📈 35.76 Punkte

📌 Build and Deploy a ReactJS App to AWS EC2 with Docker, NGINX, and Automate with GitHub Actions.


📈 35.76 Punkte

📌 Deploy Tiny-Llama on AWS EC2


📈 35.76 Punkte

📌 From Localhost to the Cloud: A Guide to deploy Flask web application on AWS EC2


📈 35.76 Punkte

📌 How to Monitor Linux EC2 Instance Availability and Log the Data in CSV


📈 32.73 Punkte

📌 How to create a Docker Image with Nginx from an EC2 Instance and Push to ECR Repository


📈 32.73 Punkte

📌 How to Connect MySQL to EC2 Instance From Ubuntu?


📈 32.73 Punkte

📌 How to Create Folder on S3 From EC2 Instance


📈 32.73 Punkte

📌 How to Delete Instance in EC2?


📈 32.73 Punkte

📌 Red-Detector - Scan Your EC2 Instance To Find Its Vulnerabilities Using Vuls.io


📈 32.73 Punkte

📌 3-part series on creating a Docker Nginx image on an EC2 instance using Amazon ECS, ECR and Application Load Balancer


📈 32.73 Punkte

📌 How To Connect to an EC2 Instance Using SSH


📈 32.73 Punkte

📌 Amazon EC2 DL2q instance for cost-efficient, high-performance AI inference is now generally available


📈 32.73 Punkte











matomo