-
-
Save gcollazo/850359 to your computer and use it in GitHub Desktop.
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 | |
# Based on Amazon EC2 AMI ID ami-ccf405a5 Ubuntu Server 10.10 | |
# This script must install the following requirements | |
# * apache2 | |
# * mod_wsgi | |
# * mysql | |
# * pip | |
# * virtualenv | |
# * virtualenvwrapper | |
# * virtualenvwrapper setup | |
# * make webapps folder | |
# Define your settings | |
dbpass="password" | |
virtualenv_dir="/var/virtualenvs" | |
apps_dir="/var/webapps" | |
# Do the dirty work | |
echo "This will take a few minutes..." | |
sudo apt-get update -qq | |
sudo apt-get upgrade -qq | |
echo "mysql-server mysql-server/root_password select $dbpass" | debconf-set-selections | |
echo "mysql-server mysql-server/root_password_again select $dbpass" | debconf-set-selections | |
sudo apt-get install -qq mysql-server | |
sudo apt-get install -qq mysql-client | |
sudo apt-get install -qq apache2 libapache2-mod-wsgi | |
sudo apt-get install -qq python-setuptools python-dev build-essential | |
sudo apt-get install -qq python-pip | |
sudo pip install virtualenv | |
sudo pip install virtualenvwrapper | |
# Make virtualenvwrapper work | |
sudo mkdir $virtualenv_dir | |
sudo chown -R ubuntu:ubuntu $virtualenv_dir | |
echo "export WORKON_HOME=/var/virtualenvs" >> ~/.profile | |
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.profile | |
source ~/.profile | |
# Create WebApps Folder | |
sudo mkdir $apps_dir | |
echo "All done now!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment