Skip to content

Instantly share code, notes, and snippets.

@whittlem
Created June 11, 2022 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whittlem/49666ee782681eadbbf3a0050b834e5f to your computer and use it in GitHub Desktop.
Save whittlem/49666ee782681eadbbf3a0050b834e5f to your computer and use it in GitHub Desktop.
aws-ec2-rhel8-apache24-bootstrap
#/usr/bin/bash
yum update -y
dd if=/dev/zero of=/swapfile bs=128M count=32
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon -s
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
yum install httpd -y
chkconfig httpd on
service httpd start
echo '<html><head><title>It works!</title></head><body>It works!</body></html>' > /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment