Prepare your Ubuntu server (you are required to be a sudoer)

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install apache2 libapache2-mod-php5 postgresql php5-pgsql git-core
$ sudo a2enmod rewrite
$ sudo a2enmod authnz_ldap
$ sudo a2enmod headers

Change Apache settings with:

AllowOverride All
AllowEncodedSlashes On

Reload Apache settings

$ sudo /etc/init.d/apache2 force-reload

Install Cassandre program

$ cd /var/www/
$ sudo git clone git://cassandre-qda.git.sourceforge.net/gitroot/cassandre-qda/cassandre-qda
$ cd cassandre-qda
$ sudo mkdir corpus
$ sudo chown www-data corpus

Check that .htaccess contains:

RewriteBase /

Configure Cassandre database

$ sudo -u postgres createdb -E utf8 cassandre
$ sudo -u postgres createuser --no-superuser --no-createdb --no-createrole --pwprompt cassandre
$ sudo -u postgres createlang plpgsql cassandre
$ sudo -u postgres psql cassandre -f scripts/cassandre.sql
$ sudo -u postgres psql cassandre
  # GRANT ALL ON actors TO cassandre;
  # GRANT ALL ON viewpoints TO cassandre;
  # GRANT ALL ON actors_viewpoints TO cassandre;
  # GRANT ALL ON topics TO cassandre;
  # GRANT ALL ON fragments TO cassandre;
  # GRANT ALL ON atoms TO cassandre;
  # GRANT ALL ON viewpoints_folders TO cassandre;
  # GRANT ALL ON attributes TO cassandre;
  # GRANT ALL ON traces TO cassandre;
  # GRANT ALL ON viewpoints_viewpoint_id_seq TO cassandre;
  # GRANT ALL ON topics_topic_id_seq TO cassandre;

Change Cassandre settings ('config.inc.php') with:

<?php 
   define ('HT_DB_HOST',  'SERVICE HOST NAME GOES HERE');
   define ('HT_DB_NAME',  'cassandre'); 
   define ('HT_DB_USER',  'cassandre');
   define ('HT_DB_PASS',  'PASSWORD GOES HERE');
   define ('URL_PREFIX',  '');
   define ('ATOMS_TABLE',  'atoms');
   define ('FRAGMENTS_TABLE',  'fragments');
?>

Protect your Cassandre database password:

$ sudo chown www-data config.inc.php
$ sudo chmod 400 config.inc.php

Contact Christophe Lejeune if you need some help.

Powered by MediaWiki