Skip to content

Instantly share code, notes, and snippets.

@mungi
Created June 17, 2017 08:52
Show Gist options
  • Save mungi/cbc468ea4ea14dfbcb31259d379850e3 to your computer and use it in GitHub Desktop.
Save mungi/cbc468ea4ea14dfbcb31259d379850e3 to your computer and use it in GitHub Desktop.
simple userdata for demo
#!/bin/bash
yum update -y
yum install -y httpd24 php56 mysql55-server php56-mysqlnd
service httpd start
chkconfig httpd on
groupadd www
usermod -a -G www ec2-user
chown -R root:www /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} +
find /var/www -type f -exec chmod 0664 {} +
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment