Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
 ____             _
 | __ )  __ _ ___(_) ___
 |  _ \ / _` / __| |/ _ \
 | |_) | (_| \__ \ |  __/
 |____/ \__,_|___/_|\___|

Installing and deploying Basie on Linux using Apache
----------------------------------------------------

0. 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


1. wget http://basieproject.org/Basie-0.5.tar.gz
2. tar -xvf Basie-0.5.tar.gz
3. mv Basie-0.5 basie
4. cd basie

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

    a. python2.5 bootstrap.py
    b. ./bin/buildout -v
    c. ./bin/django linkmedia

       Establishes links to CSS and other media files.

    d. ./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.

    e. ./bin/django compilemessages

       This will install translated languages for Basie.

6. 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                                                             |
   | </Directory>                                                                   |
   |                                                                                |
   | 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                                                             |
   | </Directory>                                                                   |
   |                                                                                |
   | 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.

7. cd /etc/apache2/sites-available
    sudo a2ensite basie

8. 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/settings.py
at the setting EXTERNAL_BACKENDS. For instance:

EXTERNAL_BACKENDS = (
   (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 setup.py 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 setup.py 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

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.