This is an old revision of the document!


Dokuwiki Install

This page describe the installation of DokuWiki.

:!: Updated for version 2011-05-25a “Rincewind”

Requirement

Dokuwiki needs Apache and PHP. I personnaly use the following Debian packages :

  • Apache2
  • PHP5

For more details, look at Web Server (Apache)

Site installation

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.

With the Debian repository

Install the package :

  • Dokuwiki

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 :

  • /etc/dokuwiki : configurations
  • /usr/share/dokuwiki : binaries
  • /var/lib/dokuwiki : datas

Configure Apache

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.

From the sources

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-2008-05-05.tgz
dokuwiki-2008-05-05/
dokuwiki-2008-05-05/.htaccess.dist
dokuwiki-2008-05-05/README
dokuwiki-2008-05-05/index.php
dokuwiki-2008-05-05/install.php
dokuwiki-2008-05-05/COPYING
dokuwiki-2008-05-05/doku.php
dokuwiki-2008-05-05/VERSION
dokuwiki-2008-05-05/bin/
dokuwiki-2008-05-05/bin/.htaccess
dokuwiki-2008-05-05/bin/indexer.php
....
:/opt# mv dokuwiki-2008-05-05/ dokuwiki
:/opt# l
total 4
drwxr-xr-x 7 matthieu Debian-exim 4096 2008-05-05 19:10 dokuwiki
:/opt#

You need to apply the following rights :

  • all the files need to be readable by www-data (apache user)
  • the directory “data” and his subfolders need to be writable by www-data
  • the conf directory needs to be writable by www-data if you want to be able to configure dokuwiki from the web interface
  • the directory “lib/plugins/” needs to be writable by www-data if you want to be able to install plugins from the web interface

Example :

:/opt# chown -R matthieu:matthieu dokuwiki/
:/opt# chown matthieu: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 92
drwxr-xr-x  2 matthieu matthieu  4096  7 nov.  17:43 bin
drwxr-xr-x  2 www-data matthieu  4096  7 nov.  17:43 conf
-rw-r--r--  1 matthieu matthieu 17992  7 nov.  17:43 COPYING
drwxr-xr-x 10 www-data matthieu  4096  7 nov.  17:43 data
-rw-r--r--  1 matthieu matthieu  2185  7 nov.  17:43 doku.php
-rw-r--r--  1 matthieu matthieu 11730  7 nov.  17:43 feed.php
-rw-r--r--  1 matthieu matthieu  1526  7 nov.  17:43 .htaccess.dist
drwxr-xr-x  6 matthieu matthieu  4096  7 nov.  17:43 inc
-rw-r--r--  1 matthieu matthieu   182  7 nov.  17:43 index.php
-rw-r--r--  1 matthieu matthieu 17428  7 nov.  17:43 install.php
drwxr-xr-x  9 matthieu matthieu  4096  7 nov.  17:43 lib
-rw-r--r--  1 matthieu matthieu   306  7 nov.  17:43 README
-rw-r--r--  1 matthieu matthieu    22  7 nov.  17:43 VERSION
:/opt/dokuwiki# l lib/
total 32
drwxr-xr-x 2 matthieu matthieu 4096  7 nov.  17:43 exe
drwxr-xr-x 2 matthieu matthieu 4096  7 nov.  17:43 _fla
drwxr-xr-x 8 matthieu matthieu 4096  7 nov.  17:43 images
-rw-r--r-- 1 matthieu matthieu  376  7 nov.  17:43 index.html
drwxr-xr-x 9 www-data matthieu 4096  7 nov.  17:43 plugins
drwxr-xr-x 2 matthieu matthieu 4096  7 nov.  17:43 scripts
drwxr-xr-x 2 matthieu matthieu 4096  7 nov.  17:43 styles
drwxr-xr-x 3 matthieu matthieu 4096  7 nov.  17:43 tpl
:/opt/dokuwiki# l ..
total 12
drwxr-x--- 7 matthieu www-data 4096  7 nov.  17:43 dokuwiki
:/opt/dokuwiki#

Configure Apache

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.

First configuration of dokuwiki

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 :

  • the wiki name
  • the super admin name
  • the wiki type
    • Open Wiki (read, write, upload for everyone)
    • Public Wiki (read for everyone, write & upload for registered users)
    • Closed Wiki (read, write, upload for registered users only)
  • the default licence of the content

www.bouthors.fr is a “Public Wiki”.

Options

Once you log in as admin, you can change the options inside “Admin » Configuration Manager”

Here are some values used for this website :

  • lang : Fr
  • breadcrumbs : 5 (10 by default)
  • youarehere : yes
  • useheading : “always” to use the first heading as page title
  • disableactions : “Register”
  • sneaky_index : yes

Sample of generated configuration

<?php
/*
 * Dokuwiki's Main Configuration File - Local Settings
 * Auto-generated by config plugin
 * Run for user: matthieu
 * Date: Sun, 02 Jan 2011 23:14:53 +0100
 */

$conf['title'] = 'www.bouthors.fr';
$conf['lang'] = 'fr';
$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;

// end auto-generated content
en/linux/dokuwiki/install.1316223180.txt.gz · Last modified: 2011/09/17 03:33 by matthieu
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki