Skip to content

Commit e521deb

Browse files
author
Ankam Ravi Kumar
authored
Create webserver.sh
Creating WebSite for first time in AWS EC2 Launch
1 parent 40302ee commit e521deb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

webserver.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
##To Install HTTPD Server and Start Service
3+
DEFAULTPATH="/var/www/html/index.html"
4+
sudo yum update –y;
5+
sudo yum install httpd –y;
6+
sudo service httpd start;
7+
sudo chkconfig httpd on;
8+
9+
sudo systemctl enable httpd.service;
10+
sudo systemctl start httpd.service;
11+
12+
sudo echo '<html>' > $DEFAULTPATH
13+
sudo echo '<h1> H1! Welcome To My First Website in AWS </h1>' >> $DEFAULTPATH
14+
sudo echo '</html>' >> $DEFAULTPATH
15+
16+
## END ##

0 commit comments

Comments
 (0)