basie /

Filename Size Date modified Message
7.4 KB
872 B
10.8 KB
2.1 KB
611 B
421 B
1.3 KB
1.6 KB
____ _ | __ ) __ _ ___(_) ___ | _ / _` / __| |/ _ \ | |_) | (_| __ | __/ |____/ \__,_|___/_|___|

Installing and deploying Basie on Linux using Apache

  1. Make sure you have the following pre-requisites installed:

    • python 2.5 (required) To install it type: sudo apt-get install python2.5 Note: If your distro ships with python higher than 2.5, you'll need to call it explicitly or otherwise use it instead of the default python version.
    • python-dev (required) To install it, type: sudo apt-get install python-dev
    • gcc (required) To install it, type: sudo apt-get install gcc
    • subversion (required) To install it type: sudo apt-get install subversion libsvn1 libsvn-dev python-subversion
    • setuptools (required) To install it type: sudo apt-get install python-setuptools Make sure that the version of setuptools is at least 0.6c9
    • subvertpy (required) If you are running Ubuntu 9.xx then type: sudo apt-get install python-subvertpy If you are running Ubuntu 8.xx then python-subvertpy will not be available as a .deb package. In this case you don't have to do anything.
    • doxygen (required) To install it type: sudo apt-get install doxygen
    • gettext (required) To install it type: sudo apt-get install xgettext (note: in case this install fails try: sudo apt-get install gettext)
    • apache2 (optional) To install it type: sudo apt-get install apache2 libapache2-mod-wsgi Below, you will find a sample apache configuration file that will enable you to use Basie behind your apache server.
    • apache portable runtime library (optional) To install it type: sudo aptitude install libapr1-dev
  2. wget

  3. tar -xvf Basie-0.5.tar.gz

  4. mv Basie-0.5 basie

  5. cd basie

  6. At this point you can either execute the installation script which will guide you through steps a-e (recommended) or you can edit basie/ yourselves for specific installation variables and then perform the following steps:

    1. python2.5

    2. ./bin/buildout -v

    3. ./bin/django linkmedia

      Establishes links to CSS and other media files.

    4. ./bin/django syncdb

      During this step you will be asked whether you want to create a superuser for Basie's installation. If you select 'No', you can do it later by running "bin/django createsuperuser" See "bin/django help" for more details.

    5. ./bin/django compilemessages

      This will install translated languages for Basie.

  7. Create the file /etc/apache2/sites-available/basie with the following contents -- keep in mind that this is only a template, and that you will have to replace PATH_TO_BASIE with an appropriate path.

    ServerAdmin webmaster@localhost ServerName basie DocumentRoot PATH_TO_BASIE

    Alias /admin-media/ PATH_TO_BASIE/parts/django/django/contrib/admin/media/ <Directory PATH_TO_BASIE/parts/django/django/contrib/admin/media>

    Order deny,allow Allow from all


    Alias /media PATH_TO_BASIE/basie/media/ <Directory PATH_TO_BASIE/basie/media>

    Order deny,allow Allow from all

    Options FollowSymLinks </Directory>

    WSGIScriptAlias / PATH_TO_BASIE/bin/django.wsgi <Directory PATH_TO_BASIE>

    Order deny,allow Allow from all


    WSGIDaemonProcess basie user=basie processes=1 threads=10 WSGIProcessGroup basie

    NOTE: The two aliases above enable links to Basie's and Django's CSS and Javascript files, as well as images etc. Also pay attention to 'user=basie' and to the process group 'basie', because they are specific to the way we deployed it. We created a user named basie, belonging to the group basie, in the home directory of which we installed Basie. Make sure that the user and the process group above match those in PATH_TO_BASIE.

  8. cd /etc/apache2/sites-available

    sudo a2ensite basie

  9. Now, http://localhost should be serving Basie's home page. If you don't

    want to run Basie on port 80, then you could wrap the above Apache configuration within a <VirtualHost *:port>

External authentication

If you need to enable external authentication of users via a validation script that checks the user's credentials against a database external to Basie (e.g. against /etc/shadow), then you need to provide an executable in PATH_TO_BASIE/basie/external_auth and declare the full path of this script in PATH_TO_BASIE/basie/ at the setting EXTERNAL_BACKENDS. For instance:

(os.path.join(path('external_auth'), 'validate'),
('validate_file1', 'validate_file2')),


You can find a sample validation program in PATH_TO_BASIE/basie/external_auth. validate.c accepts a username and a password and checks /etc/shadow and the given password files (optional). It returns one if the user's credentials are valid and zero otherwise. If you want to use it, then you need to compile the code before step 11.

How to release Basie as a tar file

Run bin/buildout setup . sdist in the directory where exists. The tar file will be created in <path-to-basie>/dist

How to release Basie as an .egg

Run bin/buildout setup . bdist_egg in the directory where exists. The .egg file will be created in <path-to-basie>/dist

How to register and upload Basie on CheeseShop

bin/buildout setup . sdist register upload