Installation

_$: apt-get update
_$: apt-get upgrade

_$: apt-get install git git-core
_$: apt-get install nginx
_$: apt-get install postgresql
_$: apt-get install postgresql-server-dev-9.1
_$: apt-get install mysql-server
_$: apt-get install php5 php5-fpm php5-mysql
_$: apt-get install python-virtualenv python-pip python-dev
_$: apt-get install supervisor
_$: apt-get install fail2ban

We will also install uWSGI. Depending on the operating system you are using, the version that comes with the packet manager might be too old. If possible, install the latest stable version from PIP. In our case, since we are going to use it for every web application we will install it globally.

_$: pip install uwsgi           # Install the latest from PIP
_$: pip install uwsgi==1.4.6    # Install a particular version

Update

If your nginx version is outdated, you can add the nginx repository to get a more recent version:

_$: apt-get install python-software-properties software-properties-common
_$: add-apt-repository ppa:nginx/stable
_$: apt-get update
_$: apt-get install nginx