DokuWiki
Contents
Installing Dokuwiki
What is dokuwiki?
"DokuWiki is a standards-compliant, simple-to-use wiki which allows users to create rich documentation repositories. It provides an environment for individuals, teams and companies to create and collaborate using a simple yet powerful syntax that ensures data files remain structured and readable outside the wiki."
"Unlimited page revisions allows restoration to any earlier page version, and with data stored in plain text files, no database is required. A powerful plugin architecture allows for extension and enhancement of the core system. See the features section for a full description of what DokuWiki has to offer."[1]
In other words; docuwiki is a wiki written in php and requires no database.
Like to see a running example?
Initial Notes
The following guide sets up a dokuwiki under a directory beneath the html root.
If anyone would like to add a vhost setup guide please feel free to add it.
lighttp Notes
lighttp creates its default directory under
/home/lighttp
The html root is located under
/home/lighttp/html/
lighttp also creates (or uses) the user account and group of
nobody:nobody
All of these settings can be changed in the file
/etc/lighttpd/lighttpd.conf
dokuwiki Notes
Some of the docuwiki plugins look to the root of the webserver rather than the root of the dokuwiki folder, which can cause some problems. All of the default plugins work with the following installation method.
Installing lighttp
php, lighttp, and fastcgi
Install php Fastcgi and lighttpd
#pacman -S lighttpd fcgi php
Add an entry to your rc.conf
DAEMONS=(syslog-ng network netfs crond lighttpd)
Edit your /etc/hosts.allow (by adding the following line)
lighttpd: ALL
Start your webserver (sanity check)
#/etc/rc.d/lighttpd start
Open a web browser to
http://127.0.0.1/
You should see this:
Arch Linux
This is a test page for the lighttpd Web Server.
Stop the webserver
#/etc/rc.d/lighttpd stop
Configuration
Uncomment these lines in /etc/lighttpd/lighttpd.conf
"mod_fastcgi"
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi" ) ) )
Installing dokuwiki
Downloading the Latest Version
Go to dokuwiki and get the latest version
#mv dokuwiki*.tar.gz /home/lighttp/html cd /home/lighttp/html #tar xvf #mv dokuwiki-DATE dokuwiki
Preparing the Installation Files
chown the dokuwiki files
#chown -R nobody:nobody dokuwiki/
(nobody is the default user for lighttp, if you changed this, change the user:group to the lighttp user:group)
dokuwiki Specific lighttp Configuration
Edit the /etc/lighthttpd/lighttpd.conf file
Under the line:
$HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" }
add this:
# subdir of dokuwiki # comprised of the subdir of the root dir where dokuwiki is installed # in this case the root dir is the basedir plus /htdocs/ # Note: be careful with trailing slashes when uniting strings. # all content on this example server is served from htdocs/ up. #var.dokudir = var.basedir + "/dokuwiki" var.dokudir = server.document-root + "/dokuwiki" # make sure those are always served through fastcgi and never as static files # deny access completly to these $HTTP["url"] =~ "/\.ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "/_ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/bin/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/data/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/inc/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/conf/" { url.access-deny = ( "" ) }
These entries give some basic security to docuwiki. lighttpd does not use .htaccess files like apache. You CAN install with out this, but I would NEVER recommend it.
For further (possibly updated) configuration, please see the dokuwiki install guide
Restart lighttp
Start your webserver
#/etc/rc.d/lighttpd start
Install docuwiki
Open a webbrowser to
http://127.0.0.1/dokuwiki/install.php
Post Installation
Cleaning Up
After configuring the server remove the install.php file!
#rm install.php
Installing Plugins
Many community created plugins can be found here
They can be added through the web interface (as well as updated) through the Admin menu.
Backing Up
It is very trivial to backup docuwiki, since there is no database. All pages are in plain text, and require only a simple tar, or rsync.
A quick breakdown of the directories of interest in the current (2008-05-05) version:
/docuwiki/data/ => All User Created Data /docuwiki/lib/plugins/ => All User Added Plugins
Further Reading
The dokuwiki main site has all of the information and help that you could possibly need.