Unixbhaskar's Blog

Thursday, October 14, 2010

DokuWiki : An opensource wiki to maintain information

In this article I will show you how you can install and use dokuwiki to keep your information in formatted manner.The biggest thing attract me that it uses flat file or plain text file to store information then backend database.So if you want to distribute the that file across different partition to get the same doc.Whereas in the corporate there should be separate dokuwiki server to maintain all the information.

Get the software:

bhaskar@bhaskar-laptop_16:24:53_Thu Oct 14:~/Documents> sudo yum install dokuwiki
[sudo] password for bhaskar:
Loaded plugins: presto, refresh-packagekit
google-chrome | 951 B 00:00
google-chrome/primary | 3.1 kB 00:00
google-chrome 5/5
openvz-kernel-rhel5 | 951 B 00:00
openvz-utils | 951 B 00:00
rpmfusion-free-updates | 2.8 kB 00:00
updates/metalink | 3.3 kB 00:00
updates | 4.7 kB 00:01
updates/primary_db | 5.0 MB 05:42
updates-source/metalink | 3.3 kB 00:00
updates-source | 3.3 kB 00:00
Setting up Install Process
Package dokuwiki-0-0.4.20091225.c.fc12.noarch already installed and latest version
Nothing to do

So it says I already have it and yes I had it long time back.Lets check out:

bhaskar@bhaskar-laptop_17:07:28_Thu Oct 14:~/Documents> sudo rpm -qi dokuwiki
[sudo] password for bhaskar:
Name : dokuwiki Relocations: (not relocatable)
Version : 0 Vendor: Fedora Project
Release : 0.4.20091225.c.fc12 Build Date: Tue 19 Jan 2010 04:23:45 PM IST
Install Date: Thu 23 Sep 2010 03:51:04 PM IST Build Host:
Group : Applications/Internet Source RPM: dokuwiki-0-0.4.20091225.c.fc12.src.rpm
Size : 6977076 License: GPLv2
Signature : RSA/8, Tue 19 Jan 2010 04:53:04 PM IST, Key ID 9d1cc34857bbccba
Packager : Fedora Project
Summary : Standards compliant simple to use wiki
Description :
DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating
documentation of any kind. It has a simple but powerful syntax which makes sure
the datafiles remain readable outside the Wiki and eases the creation of
structured texts.

All data is stored in plain text files no database is required.

Lets find out the file that installed by this software:


.......output snipped for clarity

Hell lot of files get installed by the software.Next move on to installation of this software.We must have the top tree in the web space scope to get access through the browser.

bhaskar@bhaskar-laptop_17:20:58_Thu Oct 14:~/Documents> ls -al /var/www/html/dokuwiki/
total 44
drwxr-xr-x. 6 root root 4096 2010-09-23 18:08 .
drwxr-xr-x. 5 root root 4096 2010-09-24 18:15 ..
drwxr-xr-x. 2 root root 4096 2010-09-23 15:50 bin
drwxr-xr-x. 2 root root 4096 2010-09-23 18:10 conf
-rw-r--r--. 1 root root 2258 2010-09-23 16:01 doku.php
-rw-r--r--. 1 root root 11725 2010-01-17 16:05 feed.php
drwxr-xr-x. 5 root root 4096 2010-09-23 15:50 inc
-rw-r--r--. 1 root root 185 2010-09-23 16:09 index.php
drwxr-xr-x. 9 root root 4096 2010-09-23 15:51 lib

Now next job is go to the browser and invoke


Now a bit of file permission issue which might raised in the time or after the installation.Here is some point stright out of the dokuwiki site:

  • Permissions for a file are dependent of the file's owner and group and the user who tries to access the file
  • There are permissions for read, write and execute
  • Each UNIX process runs with the permissions of an OS user and his groups
  • The web server is a UNIX process
  • PHP usually runs as part of the web server
  • DokuWiki will run with the permissions of the PHP processor
  • DokuWiki needs read, write and execute permissions for directories it needs to create files in
  • DokuWiki needs read and write permissions for files it needs to write to
  • DokuWiki needs read only permissions for files and directories it doesn't need to write to
For more details on the permission setting see here .

Now once you are up and running with proper setting of php(yes,dokuwiki depend on php and should integrated with a web server.In out case we use Apache)

But until you configure your web server properly you won't be able to get the proper thing about this software. So let me share the Apache config related to this software:

1 # dokuwiki
2 # Standards compliant simple to use wiki
3 # 0
4 #
5 Alias /dokuwiki /var/www/html/dokuwiki
7 Options +FollowSymLinks
8 Order Allow,Deny
9 Allow from ::1

12 Order Deny,Allow
13 Deny from all

16 Order Deny,Allow
17 Deny from all

20 ## no access to the fla directory
21 Order allow,deny
22 Deny from all

25 Order Deny,Allow
26 Deny from all


So name it as dokuwiki.conf and put it in the /etc/apache| httpd/conf.d/

Restart the Apache to and go to the browser to get the start page by visiting the url mentioned above.

The dokuwiki file structure under the /etc looks like below:

bhaskar@bhaskar-laptop_17:37:34_Thu Oct 14:/etc/dokuwiki> ls
acl.auth.php dokuwiki.php interwiki.conf local.php mime.conf scheme.conf users.auth.php words.aspell
acronyms.conf entities.conf license.php mediameta.php msg smileys.conf wordblock.conf

Here it looks like on my system as I have created many pages with documentation,

Dokuwiki :

Now it is blessed with ACL(Access Control List),so you can tighten the grip on web space file permission.

bhaskar@bhaskar-laptop_17:37:34_Thu Oct 14:/etc/dokuwiki> sudo getfacl /var/www/html/dokuwiki/
[sudo] password for bhaskar:
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/dokuwiki/
# owner: root
# group: root

Now the files might have different permission for your case.

To create a page you have click on the start hyperlink and it will provide you an empty page. On that page you have to click on the "create page" button to start working on it.

Dokuwiki has it's own syntax to work with and is very easy to implement.Kindly glean over it's syntax page for details.

Hope this will give you a fair idea how it works.If possible I might update this page later time with more details.


No comments:

Post a Comment