Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Last active February 8, 2022 00:50
Show Gist options
  • Save mikepfeiffer/c079608703e604224e58a3d40d0fa043 to your computer and use it in GitHub Desktop.
Save mikepfeiffer/c079608703e604224e58a3d40d0fa043 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Tutorial: Install a LAMP web server on the Amazon Linux AMI
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
# ensure that all of your software packages are up to date
sudo yum update -y
# install related dependencies
sudo yum install -y httpd24 php72 mysql57-server php72-mysqlnd
# start the web server
sudo service httpd start
sudo chkconfig httpd on
# configure PHP info page
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
# configure MySQL
sudo service mysqld start
sudo mysql_secure_installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment