Table of Contents

Step 1. Sign in to AWS Management Console
Step 2. Launch an EC2 Instance with desired specifications






Click > Launch Instance

Step 3. Connect to an EC2 instance
Select EC2 Instance Connect option and click on Connect button


Step 4. Install an Apache Server on the instance
a. Switch to root user:
1 |
sudo su |
b. Now run the updates using the following command:
1 |
yum -y update |
c. Once completed, let’s install and run an Apache server
Install the Apache web server:
1 |
yum install httpd -y |
d. Start the web server:
1 |
systemctl start httpd |
e. Now Enable httpd:
1 |
systemctl enable httpd |
f. Check the webserver status
1 |
systemctl status httpd |
Step 5. Create a web page and publish it on the instance
a. To add the contents into index.html file using echo, copy and paste the below command to shell.echo”
1 |
<html>Hello World!</html>">/var/www/html/index.html |
b. Restart the web server by using the following command:
1 |
systemctl restart httpd |