We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e662b1 commit eb95e28Copy full SHA for eb95e28
1 file changed
Automations/BootStraping/WebServers/ec2-httpd.sh
@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+#==========================================
4
+# INSTALL APACHE SERVER ON AMAZON LINUX 2
5
6
7
+# Get super user priviliges
8
+sudo su
9
10
+#=== Update and Install httpd (Linux 2 Version) ===
11
12
+# Updates instance (server)
13
+yum update -y
14
+# Install httpd.x86_64
15
+yum install -y httpd.x86_64
16
+# Start httpd service
17
+systemctl start httpd.service
18
+# Enables httpd service auto-restart if instance gets re-started
19
+systemctl enable http.service
20
+# -OPTIONAL: Overwrites apache welcome index.html file with instance name
21
+echo "$(hostname -f) is now running..." > /var/www/html/index.html
0 commit comments