Skip to content

Instantly share code, notes, and snippets.

@beevo
Last active March 5, 2018 19:53
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 beevo/b9492f68f21d19093899e92e820538c1 to your computer and use it in GitHub Desktop.
Save beevo/b9492f68f21d19093899e92e820538c1 to your computer and use it in GitHub Desktop.
EC2 Start up
#!/bin/bash
sudo yum update -y
sudo yum remove httpd* php* -y
sudo yum install httpd24 -y
sudo yum install php71 -y
sudo yum install php71-mbstring -y
sudo yum install mysql57-server -y
sudo yum install php71-mysqlnd -y
sudo groupadd www
sudo usermod -a -G www ec2-user
sudo chown -R root:www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} +
find /var/www -type f -exec sudo chmod 0664 {} +
sudo service httpd start
sudo chkconfig httpd on
echo '<?php print phpinfo();' | sudo tee --append /var/www/html/phpinfo.php
cd ~
sudo curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
sudo ln -s /usr/local/bin/composer /usr/bin/composer
sudo yum install git -y
sudo service mysqld start
sudo chkconfig mysqld on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment