Skip to content

Instantly share code, notes, and snippets.

@barmatz
Created November 11, 2016 12:39
Show Gist options
  • Select an option

  • Save barmatz/506fb8338f8ce03c1bd0cf5d80c12b87 to your computer and use it in GitHub Desktop.

Select an option

Save barmatz/506fb8338f8ce03c1bd0cf5d80c12b87 to your computer and use it in GitHub Desktop.
The following procedures help you install the Apache web server with PHP and MySQL support on your Amazon Linux instance
#!/bin/bash
# update yum
sudo yum update -y
# install Apache web server, MySQL, and PHP
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
# start the Apache web server
sudo service httpd start
# configure the Apache web server
sudo chkconfig httpd on
# add the www group
sudo groupadd www
# add the ec2-user user to the www group
sudo usermod -a -G www ec2-user
# You need to log out and log back in to pick up the new group
echo "Log out and then log back in again. You can use the exit command, or close the terminal window"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment