Skip to content

Instantly share code, notes, and snippets.

@pictolearn
Created August 24, 2019 07:34
Show Gist options
  • Save pictolearn/9b4197a897e5dbdb68b62b71b8ebcc68 to your computer and use it in GitHub Desktop.
Save pictolearn/9b4197a897e5dbdb68b62b71b8ebcc68 to your computer and use it in GitHub Desktop.
#!/bin/bash
yum update -y
amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2
yum install -y httpd mariadb-server
systemctl start httpd
systemctl enable httpd
usermod -a -G apache ec2-user
chown -R ec2-user:apache /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