{{tag>en en:linux en:server en:web en:wiki}}
====== Dokuwiki Install ======
This page describe the installation of [[en:linux: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 [[en:linux:Serveur Web]]
===== 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
Options +FollowSymLinks
AllowOverride All
order allow,deny
# allow from 127.0.0.1
allow from all
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-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 :
* 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 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#
=== 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
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
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 =====