Created
February 8, 2012 13:13
-
-
Save ruiwen/1769347 to your computer and use it in GitHub Desktop.
Server setup for Django / uWSGI / nginx
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 | |
# Check if we're root | |
if [ 0 -ne `id -u` ]; then | |
id -u | |
echo "This script needs to be run as root. Exiting." | |
exit 1 | |
fi | |
# Add uwsgi and nginx repositories | |
#add-apt-repository ppa:uwsgi/release | |
#add-apt-repository ppa:nginx/stable | |
# Initial update | |
#apt-get update | |
# Needed libraries | |
apt-get install build-essential | |
apt-get install python-dev | |
apt-get install libmysqlclient-dev | |
apt-get install libjpeg8-dev | |
apt-get install zlib1g-dev | |
# Web server stuff | |
apt-get install uwsgi | |
apt-get install uwsgi-plugin-python | |
#apt-get install nginx-common nginx-full | |
apt-get install nginx | |
# Supporting applications / libraries | |
apt-get install python-mysqldb | |
apt-get install git | |
apt-get install mercurial | |
apt-get install python-pip | |
apt-get install virtualenv | |
# Other admin | |
adduser --system --group --no-create-home --disabled-password --disabled-login uwsgi | |
# Stuff with prompts | |
apt-get install mysql-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment