======Documentation in a changing environment======
When an easy to use textual documentation system is needed, with the option to make several namespaces (for example, each department its own) and have the option to secure them, Dokuwiki is a good choice. Dokuwiki contains a LDAP-module for user authentication. More details on Dokuwiki are available on the [[http://wiki.splitbrain.org/wiki:dokuwiki|Dokuwiki website]].
=====Dokuwiki=====
All textual data is placed in the wiki. Updates and additions can be easily made. For convenience, images can be added.
====Pre-installation====
Dokuwiki is a web based application that is written in PHP. So you'll need a webserver that supports PHP. You might want a LDAP-server for user authentication.
* Hannibal documentation on [[hannibal:apache|howto install an Apache webserver]] with support for PHP.
* Hannibal documentation on [[hannibal:fds|howto install a LDAP server]] for user authentication.
You're strongly advised to read the [[http://wiki.splitbrain.org/wiki:security|Dokuwiki Security page]] before you start the installation process!
====Installation====
Although a prebuild Dokuwiki package is available for Debian Etch, we prefer to get the latest version of the stable source code ourselves. If you want to use the prebuild package instead, read the [[http://wiki.splitbrain.org/wiki:install:debian|Debian installation page]] on the Dokuwiki website.
You can download the Dokuwiki software at [[http://www.splitbrain.org/projects/dokuwiki]]. Unpack the source in /var/www and create a symbolic link for convenience.
cd /var/www/
tar -zxvf /root/dokuwiki-2007-06-26b.tgz
ln -s dokuwiki-2007-06-26b dokuwiki
Set the permissions as documented at [[http://wiki.splitbrain.org/wiki:install:permissions]].
Now point your browser to http://yourwebserver/dokuwiki/install.php and follow the instructions.
====Configuration====
Create several namespaces. Secure each namespace with an appropriate group. Put your users in the groups of the namespaces they need to read or edit.
===LDAP authentication===
==Fedora Directory Server==
Edit conf/local.php
$conf['title'] = 'wiki-hannibal';
$conf['lang'] = 'en';
$conf['useacl'] = 1;
$conf['openregister'] = 0;
$conf['authtype'] = 'ldap';
$conf['auth']['ldap']['server'] = 'ldap://ldap.intra.example.com:389';
$conf['auth']['ldap']['usertree'] = 'ou=People,dc=intra,dc=example,dc=com';
$conf['auth']['ldap']['grouptree'] = 'ou=Groups,dc=intra,dc=example,dc=com';
$conf['auth']['ldap']['userfilter'] = '(&(uid=%{user})(objectClass=posixAccount))';
$conf['auth']['ldap']['groupfilter'] = '(&(objectClass=posixGroup)(memberUID=%{uid}))';
$conf['auth']['ldap']['version'] = 3;
$conf['superuser'] = '@wikiadmins';
==Microsoft Active Directory server==
Although strictly not a (supported) part of the Hannibal system-stack, this conf/local.php snipplet might allow you to authenticate against the Microsoft Active Directory server LDAP implementation:
...
$conf['youarehere'] = 1;
$conf['useacl'] = 1;
$conf['authtype'] = 'ldap';
$conf['superuser'] = '@wikiadmins';
$conf['disableactions'] = 'register';
$conf['updatecheck'] = 0;
$conf['openregister'] = '0';
$conf['auth']['ldap']['server'] = 'intra.example.com';
$conf['auth']['ldap']['binddn'] = '%{user}@%{server}';
$conf['auth']['ldap']['usertree'] = 'dc=intra,dc=example,dc=com';
$conf['auth']['ldap']['userfilter'] = '(userPrincipalName=%{user}@%{server})';
$conf['auth']['ldap']['mapping']['name'] = 'displayname';
$conf['auth']['ldap']['mapping']['grps'] = 'array(\'memberof\' => \'/CN=(.+?),/i\')';
$conf['auth']['ldap']['grouptree'] = 'dc=intra,dc=example,dc=com';
$conf['auth']['ldap']['groupfilter'] = '(&(cn=*)(Member=%{dn})(objectClass=group))';
$conf['auth']['ldap']['referrals'] = '0';
$conf['auth']['ldap']['version'] = '3';
=====HTTP-fileserver=====
Static documentation from internal or external sources does not fit well in a wiki. However, web based accessibility of this data might be very useful. In addition to Dokuwiki you could deploy a fileserver based on the webDAV-protocol as a solution.
* Hannibal documentation on [[hannibal:fileserver#webdav|howto install a fileserver based on the webDAV-protocol]].