Howto - install the server on Centos

download the rpm from the file section :

http://www.banquise.be/projects/banquise-server/files

install epel (optional, you may have that repo already) :

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

install banquise server and the dependencies via yum (sorry I still have to sign the package)

# yum localinstall banquise-server-0.5-7.noarch.rpm --nogpgcheck

the mysql-python package provided for Centos is too old, you can install this one :

http://bashton.com/downloads/rpm/mysql-python/MySQL-python-1.2.2-1.x86_64.rpm

if you run mysql on the same server, start mysql :

# /etc/init.d/mysql start

create a database and a user for banquise :

# mysql
mysql> create database banquise;
mysql> grant all privileges on banquise.* to user@localhost identified by 'password';

configure banquise :

# cd /var/www/banquise
# vi settings.py

modify/check the following variables :

DATABASE_NAME
DATABASE_USER
DATABASE_PASSWORD
DATABASE_PORT

initialize the database :

# cd /var/www/banquise
# ./manage.py syncdb
# ./manage.py migrate --no-initial-data web

now you have two options :

- running banquise on a dedicated vhost - ex: http://banquise.lefred.be/
- running banquise on an existing webserver setup - ex: http://www.lefred.be/banquise/

first option:

 <VirtualHost *:80>
    ServerAdmin lefred@inuits.be
    ServerName banquise.lefred.be

    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE banquise.settings
    SetEnv PYTHON_EGG_CACHE /tmp
    PythonOption django.root /banquise
    PythonPath "['/var/www'] + sys.path" 
    PythonDebug On

 Alias /media "/var/www/banquise/web/media" 
 <Location "/media">
    SetHandler None
 </Location>
 Alias /admin/media "/usr/lib/python2.4/site-packages/django/contrib/admin/media" 
 <Location "/admin/media">
    SetHandler None
 </Location>
 </VirtualHost>

second option:

the apache configuration is already provided by the rpm and it's located in /etc/httpd/conf.d/banquise-server.conf :

 RewriteEngine On

 #  now the rewriting rules
 RewriteRule   ^/web/(.*)$ /banquise/web/$1 [PT] 

 <Location "/banquise/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE banquise.settings
    PythonOption django.root /banquise
    PythonPath "['/var/www'] + sys.path" 
    PythonDebug On
 </Location>
 Alias /media "/var/www/banquise/web/media" 
 <Location "/media">
    SetHandler None
 </Location>

you only need to modify settings.py (in /var/www/banquise/) and add the following line at the end:

LOGIN_URL='/banquise/accounts/login'

start apache :

# /etc/init.d/httpd start