Skip to content

Instantly share code, notes, and snippets.

@sanju2
Created June 12, 2023 17:46
Show Gist options
  • Save sanju2/f744153261fe4e776295d2627f9ec2bb to your computer and use it in GitHub Desktop.
Save sanju2/f744153261fe4e776295d2627f9ec2bb to your computer and use it in GitHub Desktop.
EC2 101 demo
#!/bin/bash
# Use this for your user data (script from top to bottom)
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1>Hello World from $(hostname -f)</h1>" > /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment