Last active
January 4, 2016 20:49
-
-
Save paulsheldrake/8676877 to your computer and use it in GitHub Desktop.
Setup AWS linux to have a LAMP stack (folder permissions and drush) Part 2. Once this is done you can clone your drupal code in to /var/www/html, setup your database and you should be ready to go
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 | |
## fix the folder permissions for the html directory | |
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 {} + | |
## install drush | |
sudo pear channel-discover pear.drush.org | |
sudo pear install drush/drush-5.9.0 | |
wget http://download.pear.php.net/package/Console_Table-1.1.3.tgz | |
sudo tar -xf Console_Table-1.1.3.tgz -C /usr/share/pear/drush/lib | |
## fix the httpd.conf so clean urls work | |
sudo sed -i '151s/.*/ AllowOverride All/' /etc/httpd/conf/httpd.conf | |
sudo service httpd restart | |
## create a test index.php file | |
touch /var/www/html/index.php | |
echo "<?php phpinfo(); ?>" >> /var/www/html/index.php | |
## put a little message saying where to view the phpinfo page | |
sudo yum -y install cloud-utils | |
echo "Take a look at the following IP to see your PHP config" | |
ec2-metadata --public-ipv4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment