Setting up the Act databases

In order to use the database with Act, you need to follow the procedure explained below. Act's preferred database is PostgreSQL, so the examples use Pg's syntax.

As the postgres superuser, create a database user named act (for example):

    $ createuser act
    Shall the new user be allowed to create databases? (y/n)        y
    Shall the new user be allowed to create more new users? (y/n)        n

Still as the postgres superuser, create three databases named act, acttest and actwiki:

    $ su - postgres
    $ createdb act --encoding=UTF8
    $ createdb acttest --encoding=UTF8
    $ createdb actwiki --encoding=UTF8
    $ ^D

Grant access from localhost to these databases by adding these lines to pg_hba.conf:

    local act     nobody md5
    local acttest nobody md5
    local actwiki nobody md5

and restart the PostgreSQL server.

Run the output of bin/dbinit in this directory. This will create the tables in databases act and acttest:

    $ bin/dbinit | psql -U act act
    $ bin/dbinit | psql -U act acttest

Run wiki-toolkit-setupdb to create the tables in database actwiki. (This utility is installed by Wiki::Toolkit.)

    $ wiki-toolkit-setupdb --type postgres --name actwiki --user act --pass xyzzy

Update $ACTHOME/conf/act.ini (or $ACTHOME/conf/local.ini) with the database names and credentials.

    [database]
    dsn    = dbi:Pg:dbname=act
    user   = act
    passwd = xyzzy
    test_dsn    = dbi:Pg:dbname=acttest
    test_user   = act
    test_passwd = xyzzy
    [wiki]
    dbname = actwiki
    dbuser = act
    dbpass = xyzzy

From the package's top level directory, run the test suite to verify that the software is able to connect to the database.

    $ make test

Authors

Philippe Bruhat, Éric Cholet

License

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.