Skip to content

Instantly share code, notes, and snippets.

@phunguyen19
Created September 23, 2020 16:01
Show Gist options
  • Select an option

  • Save phunguyen19/ea8eef93cfe8b650d39e35f91c273435 to your computer and use it in GitHub Desktop.

Select an option

Save phunguyen19/ea8eef93cfe8b650d39e35f91c273435 to your computer and use it in GitHub Desktop.
aws ec2 user data install apache server
#!/bin/bash
# Install Apache server
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo "Hello world $(hostname -f)" > /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment