This page describe the installation of DokuWiki.
Updated for version 2011-05-25a “Rincewind”
Dokuwiki needs Apache and PHP. I personnaly use the following Debian packages :
For more details, look at Web Server (Apache)
Dokuwiki can installed from the Debian repository or directly from the sources.
I do prefer the manual installation because there is no risk of automatic upgrade from Debian.
Install the package :
During the install, choice the subdirectory of the website, for example /wiki.
The default configuration gives already a working wiki available locally (for remote access you need to change the apache configuration, see bellow).
By default, the directories used are :
By default, with apache2, dokuwiki is defined by the file /etc/dokuwiki/apache.conf. Only 127.0.0.1 is allowed.
To make the website available to everybody, you need to modify the “allow from” :
Alias /dokuwiki /usr/share/dokuwiki <Directory /usr/share/dokuwiki/> Options +FollowSymLinks AllowOverride All order allow,deny # allow from 127.0.0.1 allow from all </Directory>
The restart apache to apply the change.
Sources are available at http://www.splitbrain.org/projects/dokuwiki
Unzip the sources to the directory of your choice, for example /opt/dokuwiki/ :
:/opt# tar -zxvf /root/dokuwiki-2012-01-25a.tgz dokuwiki-2012-01-25a/ dokuwiki-2012-01-25a/lib/ dokuwiki-2012-01-25a/lib/styles/ dokuwiki-2012-01-25a/lib/styles/screen.css dokuwiki-2012-01-25a/lib/styles/all.css dokuwiki-2012-01-25a/lib/styles/print.css dokuwiki-2012-01-25a/lib/styles/index.html dokuwiki-2012-01-25a/lib/styles/feed.css dokuwiki-2012-01-25a/lib/plugins/ ... :/opt# l total 4 drwxr-xr-x 7 matt matt 4096 19 avril 12:17 dokuwiki-2012-01-25a :/opt# mv dokuwiki-2012-01-25a/ dokuwiki :/opt# l total 4 drwxr-xr-x 7 matt matt 4096 19 avril 12:17 dokuwiki :/opt#
You need to apply the following rights :
Example :
<code> :/opt# chown -R matt:matt dokuwiki/ :/opt# chown matt:www-data dokuwiki/ :/opt# chmod 750 dokuwiki/ :/opt# cd dokuwiki/ :/opt/dokuwiki# chown -R www-data data/ :/opt/dokuwiki# chown www-data conf/ :/opt/dokuwiki# chown www-data lib/plugins/ :/opt/dokuwiki# l total 100 drwxr-xr-x 2 matt matt 4096 19 avril 12:09 bin drwxr-xr-x 2 www-data matt 4096 19 avril 12:09 conf -rw-r--r-- 1 matt matt 18092 19 avril 12:09 COPYING drwxr-xr-x 12 www-data matt 4096 19 avril 12:09 data -rw-r--r-- 1 matt matt 2290 19 avril 12:12 doku.php -rw-r--r-- 1 matt matt 17037 19 avril 12:09 feed.php -rw-r--r-- 1 matt matt 1526 19 avril 11:36 .htaccess.dist drwxr-xr-x 6 matt matt 4096 19 avril 12:12 inc -rw-r--r-- 1 matt matt 182 19 avril 11:36 index.php -rw-r--r-- 1 matt matt 17781 19 avril 12:09 install.php drwxr-xr-x 8 matt matt 4096 19 avril 12:09 lib -rw-r--r-- 1 matt matt 306 19 avril 12:09 README -rw-r--r-- 1 matt matt 20 19 avril 12:12 VERSION :/opt/dokuwiki# l lib total 28 drwxr-xr-x 2 matt matt 4096 19 avril 12:09 exe drwxr-xr-x 8 matt matt 4096 19 avril 12:09 images -rw-r--r-- 1 matt matt 376 19 avril 11:36 index.html drwxr-xr-x 10 www-data matt 4096 19 avril 12:02 plugins drwxr-xr-x 3 matt matt 4096 19 avril 12:09 scripts drwxr-xr-x 2 matt matt 4096 19 avril 12:09 styles drwxr-xr-x 3 matt matt 4096 19 avril 12:09 tpl :/opt/dokuwiki# l .. total 4 drwxr-x--- 7 matt www-data 4096 19 avril 12:17 dokuwiki :/opt/dokuwiki#
When installing dokuwiki from the source, Apache need to be configured manually.
For example, create the following file in /etc/apache2/sites-available/dokuwiki :
Alias /wiki /opt/dokuwiki <Directory /opt/dokuwiki/> Options +FollowSymLinks AllowOverride All order allow,deny allow from all </Directory>
Then activate it :
:/etc/apache2/sites-available# vi dokuwiki :/etc/apache2/sites-available# a2ensite dokuwiki Site dokuwiki installed; run /etc/init.d/apache2 reload to enable. :/etc/apache2/sites-available# /etc/init.d/apache2 reload Reloading web server config...7058 . :/etc/apache2/sites-available#
Dokuwiki should be available on the /wiki.
By default Dokuwiki is a open wiki writable by everyone without authentication.
To configure it, there is an install page : install.php.
For example : http://www.monsite.fr/wiki/install.php.
The conf directory needs to be writable by www-data.
Please select the following fields :
www.bouthors.fr is a “Public Wiki”.
Once you log in as admin, you can change the options inside “Admin » Configuration Manager”
Here are some values used for this website :
<?php /* * Dokuwiki's Main Configuration File - Local Settings * Auto-generated by config plugin * Run for user: matthieu * Date: Sun, 17 Jun 2012 20:07:40 +0200 */ $conf['title'] = 'Bouthors.fr'; $conf['lang'] = 'fr'; $conf['template'] = 'arctic-mbo'; $conf['license'] = 'cc-by-sa'; $conf['breadcrumbs'] = 5; $conf['youarehere'] = 1; $conf['useheading'] = '1'; $conf['useacl'] = 1; $conf['superuser'] = '@admin'; $conf['disableactions'] = 'register'; $conf['sneaky_index'] = 1; $conf['subscribers'] = 1; $conf['cachetime'] = -1; $conf['sitemap'] = 1; // end auto-generated content