django-server /

Filename Size Date modified Message
38 B
1.4 KB
2.2 KB
1.8 KB
8.2 KB
That's this?

This script configures linux machine to run django projects. You can use it
as template to develop your own installation script.

This script works with debian machine, it uses aptitude to install webserver,
database, python, gcc, virtualenv, pip, etc.

Webserver stack is nginx + uwsgi + django + postgres.

How to use it?

1) Buy VPS. Get root SSH credentials. Setup RSA authorization::

    ssh-copy-id root@your-server

2) Log in as root

3) Download the script:

    wget --no-check-certificate -O ~/

4) Update /etc/apt/sources.list:
 * Add wheezy (testing) repository
 * Update line to use wheeze repo
 * Add mongodb repo.
 * Remove backports repository if it exists (becase we already use testing repo)

Your sources.list should looks like:

    deb squeeze main contrib non-free
    deb wheezy main contrib non-free
    deb  wheezy/updates  main contrib non-free

    deb dist 10gen

To speed up things choose debian repo mirror which is close
to your geo location.

5) Update /etc/apt/preferences.d/01custom:

    Explanation: see
    Package: *
    Pin: release o=Debian,a=stable
    Pin-Priority: 500

    Package: *
    Pin: release o=Debian,a=testing
    Pin-Priority: 901

    Package: *
    Pin: release o=Debian,a=unstable
    Pin-Priority: 300

    Package: *
    Pin: release o=Debian
    Pin-Priority: -1

6) Run the script:

    $ bash ~/

During executing you'll need to answer aptitude questions how to resolve
package version issues.

That's all. Of course, you can and should adapt script for you taste.


The script is self-documented, being the simple shell script.

Some extra comments in russian could be found here:


Create ticket on
or drop mail to