Last active
March 5, 2018 19:53
-
-
Save beevo/b9492f68f21d19093899e92e820538c1 to your computer and use it in GitHub Desktop.
EC2 Start up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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