QUICK INSTALL GUIDE


1) Planning

TODO



2) General directory and services setup

    ...
    mkdir /srv/doloforge/shared/.doloforge/mason/sessions
    chown www-data:www-data /srv/doloforge/shared/.doloforge/mason/sessions
    ln -s /srv/.nfs/doloforge /srv/doloforge/shared
    ...
    chgrp adm /var/log/apache*/*

    doloforge config --check
    sudo doloforge config --setup
    adduser nhuillard doloforge



3) Services setup

* apache
    ln -s /etc/doloforge/apache.conf /etc/apache/conf.d/doloforge
    apache-modconf apache disable perl
    apache-modconf apache disable php5
    apache-modconf apache enable libproxy
    apache-modconf apache enable mod_headers
    vi /etc/apache/httpd.conf
        remove "Alias /images/", "ScriptAlias /cgi-bin/", etc...
 
* apache-perl
    ln -s /etc/doloforge/apache-perl.conf /etc/apache-perl/conf.d/doloforge
    apache-modconf apache-perl disable php5
    apache-modconf apache-perl enable mod_headers

* apache-php
    ln -s /etc/doloforge/apache-php.conf /etc/apache-php/conf.d/doloforge

* postgresql
    vi /etc/postgresql/7.4/main/postgresql.conf
        tcpip_socket = true

    vi /etc/postgresql/7.4/main/pg_hba.conf
        # Doloforge administrative login by UNIX sockets: members of the Postgres group "doloforge" are allowed
        # Be sure that /var/lib/postgres/data/global/pg_group contains the users of the group (may not)
        # If not : "ALTER GROUP "doloforge" ADD USER "nhuillard";"
        local   all         +doloforge                                      ident sameuser
        # Doloforge user/apache connections (locally on devl, remotely on test/prod)
        host    all         all         192.168.0.0         255.255.255.0   ident sameuser

    su -c 'psql template1' postgres
        CREATE GROUP "doloforge" WITH SYSID 999;
        CREATE USER "doloforge" WITH SYSID 999 CREATEDB CREATEUSER IN GROUP "doloforge";
        CREATE USER "nhuillard" WITH SYSID 1000 CREATEDB CREATEUSER IN GROUP "doloforge";
        CREATE USER "root" WITH SYSID 10 CREATEDB CREATEUSER IN GROUP "doloforge";
        CREATE DATABASE "nhuillard" WITH ENCODING 'UNICODE';
        CREATE GROUP "www-data" WITH SYSID 33;
        CREATE USER "www-data" WITH SYSID 33 IN GROUP "www-data";

    /etc/init.d/postgresql-7.4 restart



4) Projects creation

    doloforge client --add --name internal --description 'Platform-wide internal services' --email 'webmaster@doloforge.com' --password chooth9A
        doloforge project --add --name sandbox --client internal --description 'Sandbox project for developer training' --services 'apache,mason,postgres7' --backends mason --database postgres7
        doloforge project --add --name fallback --client internal --description 'Ready to use project in case of failure on any client/project' --services 'apache,mason,postgres7' --backends mason --database postgres7

    sudo doloforge user --add --name jdoe --description "John Doe" --client 'internal'
    sudo doloforge user --group --name nhuillard --client internal

    sudo doloforge config --update



5) Reload daemons

    /etc/init.d/apache restart
    /etc/init.d/apache-perl restart
    /etc/init.d/apache-php restart












This is not a config file. Just a few notes to allow proper configuration
of the PostgreSQL database server.

1) Add Doloforge user/group and admins in the Postgres instance (or cluster, in Debian etch):
    # su - postgres
    $ psql template1
    template1=# CREATE GROUP "doloforge" WITH SYSID 999;
    template1=# CREATE USER "doloforge" WITH SYSID 999 CREATEDB CREATEUSER IN GROUP "doloforge";
    template1=# CREATE USER "nhuillard" WITH SYSID 1000 CREATEDB CREATEUSER IN GROUP "doloforge";

2) Configure Postgres authorization (pg_hba.conf):
    
