Overview

source code of http://python-gears.org

requirements:
    * Python 2.6+
    * Django 1.3.1
    * Mysql
    * Memcached
    * uWSGI
    * Nginx (uwsgi supported)
    
    
Project deployed with Virtualenv.

How to initial a NEW server for python-gears:
    apt-get update && apt-get upgrade
    
    # add a non root user (optional)
    mkdir -p /home/wang
    groupadd wang
    useradd wang -d /home/wang -g wang -s /bin/bash
    passwd wang
    usermod -a -G www-data wang
    usermod -a -G sudo wang
    
    apt-get install build-essential
    apt-get install mysql-server    # ubuntu 12.04 will install mysql 5.5
    
    vim /etc/mysql/my.cnf
        add the following in [client]
            default-character-set = utf8
        add the following in [mysqld]
            default-storage-engine = InnoDB
            character-set-server = utf8
            
    /etc/init.d/mysql restart
    
    
    apt-get install libmysqld-dev
    apt-get install python-dev
    apt-get install memcached
    apt-get install nginx
    apt-get install python-virtualenv
    
    cd /
    mkdir -p data/project
    chmod 777 data
    cd data
    chown wang:www-data project
    chmod g+w project
    
    cd project
    su wang
    mkdir python_gears  # and locate code here
    cd python_gears
    virtualenv env --no-site-packages --distribute --prompt="(python-gears)"
    source env/bin/activate
    
    pip install -r deploy/requirements.txt
    
    python manage.py validate
    
    
    
    Last: set uwsgi, nginx, run project.