]> git.sesse.net Git - itkacl/blob - itkacl-web-1.0/README
Release version 2.1 of the core library.
[itkacl] / itkacl-web-1.0 / README
1 How to set up the web admin interface:
2
3 1. Install required Perl modules, e.g. on Debian/Ubuntu:
4
5       aptitude install libdbi-perl libapache-session-perl libdbd-pg-perl
6
7 2. Create the Postgres ITKACL database, using itkacl.sql from the
8    core distribution:
9
10      createdb itkacl
11      psql itkacl < itkacl.sql
12
13 3. Roots must be added manually, e.g.:
14
15      echo "INSERT INTO objects (name, description) VALUES ('web', 'WWW-based systems');" | psql itkacl
16
17 4. Create a separate database for holding the sessions
18    (see perldoc Apache::Session::Store::Postgres):
19
20      createdb itkacl-sessions
21      echo 'CREATE TABLE sessions ( id char(32) not null primary key, a_session text )' | psql itkacl-sessions
22
23 5. Create a user for itkacl-web and give it full access:
24
25      createuser --pwprompt itkacl-web
26      echo 'GRANT SELECT, INSERT, UPDATE, DELETE ON objects TO "itkacl-web";' | psql itkacl
27      echo 'GRANT SELECT, UPDATE ON objects_id_seq TO "itkacl-web";' | psql itkacl
28      echo 'GRANT SELECT, INSERT, UPDATE, DELETE ON aclentries TO "itkacl-web";' | psql itkacl
29      echo 'GRANT SELECT, INSERT, UPDATE, DELETE ON sessions TO "itkacl-web";' | psql itkacl-sessions
30
31    You could use a separate session username if you wish, although there's
32    probably not point.
33
34 6. Set up an include/config.local.pm file. It will probably look very much like
35    include/config.pm, except without the eval part, and with your own values
36    for password etc. filled in. Remember to chmod so that it is only readable
37    by the web server.
38
39 7. Make a vhost in Apache (or any other web server supporting CGI), with the web/
40    directory as the DocumentRoot, index.pl as the DocumentIndex, and .pl enabled
41    as CGI scripts.
42
43 8. Go to your vhost, and administer to your heart's content.