9 Easy Steps to Launch AWS EC2 instance from AWS Console with Apache2 Installation

iTechnolabs Inc
3 min readApr 10, 2023

--

In the cloud share market for public cloud, AWS is one dominating cloud platform that provides businesses with a scalable, stable, and cost-effective infrastructure. With a wide range of services that are available in the AWS environment One of the most popular solutions is Amazon EC2 (Elastic Compute).

Amazon EC2 specializes in providing the ability to scale cloud computing capacity within the AWS cloud server. With the aid of Amazon EC2, you can create and launch apps faster and without having to spend extra dollars on hardware upfront. It is possible to set up virtual servers as well as manage cookies via interactive dashboards, and set up various protocols for security and networking all in one place.

If you’ve decided to start your very first AWS EC2, here’s a brief tutorial that demonstrates how to set up your AWS EC2 instance from AWS New Console and SSH into it to install Apache 2.

First, let’s examine the issue we’re working on.

What is Amazon EC2 Instance?

The Amazon EC2 instance serves as a virtual server within Amazon’s Elastic Compute Cloud (EC2) for applications to run that run on Amazon Web Services. Amazon Web Services (AWS) infrastructure. EC2 facilitates development for developers through facilitating scale-up and scaling down and providing resizable computing capacity.

Also, read: Heroku Cloud Application Platform : An App Platform for Startups

How do I start AWS Instance EC2 via AWS Console?

To start EC2, to Launch AWS EC2 instance; you must have an AWS account. If not you can sign up for an account through AWS today.

1. Log in to the account of your AWS Account and then open the AWS EC2-Dashboard.

Notice: Be sure to select the AWS Region you wish to start the instance For me, it’s (N. Virginia) us-east-1.

If you’re on the EC2 Dashboard you see there are no instances in use to create an instance click “Launch Instance”

2. Enter the name of your desired instance3. Choose AMI

You can see a range of AMI options to select. AMI is an acronym in the form of Amazon Machine Image, which is the name of the software and the operating system you wish to run on your server. In my case, I selected Ubuntu 20.04.

4. Select the type of instance you want to use.

You can choose the model of machine, the number VCPUs and memory you wish to use. Choose the option that is free and proceed to the next step (create the new key pair)

5. Create new key pair

The key pair allows you to connect via SSH to the machine that you have just created. You can create the key pair and then download it. Make sure you ensure it is safe since you won’t be able to download it once more.

6. Setup the network settings

Here you can change the subnet, vpc and security group, as well as other configurations. I’ll leave this as the default settings.

7. Configure storage

Choose what amount of space you wish for your account to be able to use. in the free version you can pick between 30 and 30GB of EBS. I’ll set this to default. Click to “Launch Instance”

8. Log in to your account

First, select the instance and then click connect.

Then, open your terminal and utilize the following command to connect to the server.

  • Chmod 400 pem Filename
  • ssh -i “pem file path” ubuntu@instancePublicIP

9. Install Apache

You are now able to install Apache So, run the below command

  • Sudo apt update
  • Sudo apt install apache2

To begin the service and ensure it’s enabled, use these commands.

  • sudo systemctl start apache2
  • sudo systemctl enable apache2

Now, open the browser by using your account’s public IP. You will be able to see your default Apache page, which indicates that Apache has been successfully installed.

Read more about AWS Console with Apache2 Installation

--

--

iTechnolabs Inc
iTechnolabs Inc

Written by iTechnolabs Inc

Web Development | Mobile App | Software Development Company

No responses yet