-
-
Save thesven/1310920 to your computer and use it in GitHub Desktop.
Ubuntu 10.04 / LAMP + Drush + Drupal Sandboxes
This file contains hidden or 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 | |
# Upgrade and install required packages. | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install lamp-server^ | |
sudo apt-get install php5-cli php5-gd php5-curl phpmyadmin | |
# Configure Apache | |
sudo sed -ie 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-available/default | |
sudo a2enmod rewrite | |
sudo /etc/init.d/apache2 reload | |
# Install Drush. | |
cd /usr/local/lib | |
sudo wget http://ftp.drupal.org/files/projects/drush-7.x-4.5.tar.gz | |
sudo tar -xzvf drush-7.x-4.5.tar.gz | |
sudo rm -rf drush-7.x-4.5.tar.gz | |
sudo chmod a+x /usr/local/lib/drush/drush | |
sudo ln -s /usr/local/lib/drush/drush /usr/local/bin/drush | |
# Create sandbox. | |
sudo mkdir -p /var/www/sandbox | |
cd /var/www/sandbox | |
# Download Drupal. | |
sudo drush dl drupal-6.22 | |
sudo mv drupal-6.22 6.x | |
sudo drush dl drupal-7.9 | |
sudo mv drupal-7.9 7.x | |
# Set permissions. | |
sudo chown -R ubuntu:www-data /var/www | |
# Set up Drupal | |
cd /var/www/sandbox/6.x | |
sudo drush si default --db-url=mysql://root:password@localhost/sandbox_6x -y | |
cd /var/www/sandbox/7.x | |
sudo drush si standard --db-url=mysql://root:password@localhost/sandbox_7x -y | |
echo "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment