Installation Instructions
*************************

This explain how to setup the "cakePhp" simple use case.
The following instruction are related to a debian machine.

Cake Php
========
# apt-get install cakephp php5

$ cd /var/www
$ cake -app . bake
What is the full path for this app including the app directory name?
> /var/www/cake 
Database Configuration:
[default] > 
Driver: 
[mysql] > postgres
Persistent Connection? (y/n) 
[n] >  
Port?  
[n] > 5432
User:  
[root] > cake
Password:  
> *****
Database Name:  
[cake] > 
Table encoding?  
[n] > utf8

$ tar -zxf .../mediatex/cake.tgz -C cake
# chgrp -R www-data /var/www/cake

Postgresql
==========
# apt-get install postgresql php5-pgsq

# su postgres
$ createuser cake
Le nouveau rôle est-il super-utilisateur ? (o/n) n
Le nouveau rôle est-il autorisé à créer des bases de données ? (o/n) n
Le nouveau rôle est-il autorisé à créer de nouveaux rôles ? (o/n) n
$ psql
postgres=# \password cake
postgres=# create database "cake" owner="cake" encoding='UTF8';
postgres=# \c cake cake localhost 5432
cake=> \i /var/www/cake/init.sql
cake=> \q

Apache
======
# apt-get install apache2
# a2enmod rewrite

# cat >> /etc/apache2/sitess-enable/000-default <<EOF
        <Directory /var/www/cake>
                AllowOverride All
        </Directory>
EOF

Mediatex
========
# mediatex adm init
# mediatex add coll cake
# mediatex add user www-data
# /etc/init.d/apache2 restart

Configuration variables
***********************

If you use the above default configuration, you should only
have to change the hostname into the default node's view.

cake/views/nodes/view.ctp
=========================
...
     echo $html->link($fils['name'], 
                       'https://YOUR_HOSTNAME/~mdtx-cake/cgi/get.cgi'.
                       $fils['url']);
...

cake/ingest.sh
==============
SERV="mdtx"
COLL="cake"
