Difference between revisions of "Dokuwiki"

From ArchWiki
Jump to: navigation, search
m (add i18n header)
(Rewrite to be more web server neutral and to use the package in [community].)
Line 1: Line 1:
 
[[Category:Office (English)]]
 
[[Category:Office (English)]]
 
{{i18n|Dokuwiki}}
 
{{i18n|Dokuwiki}}
 
== 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."
 
"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."
Line 9: Line 6:
 
"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."[http://wiki.splitbrain.org/wiki:dokuwiki]
 
"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."[http://wiki.splitbrain.org/wiki:dokuwiki]
  
In other words; DokuWiki is a wiki written in PHP and requires no database.
+
In other words, DokuWiki is a wiki written in PHP and requires no database.
  
 
[http://www.dokuwiki.org/ Like to see a running example?]
 
[http://www.dokuwiki.org/ Like to see a running example?]
  
=== Initial Notes ===
+
== Initial Notes ==
 +
DokuWiki should work on any web server which supports PHP 5.1.2 or later.  As the requirements may change over time, you should consult the [http://www.dokuwiki.org/requirements requirements page] for DokuWiki for additional details.
  
The following guide sets up a DokuWiki under a directory beneath the html root.
+
It is strongly recommend to read through the appropriate sections of [http://www.dokuwiki.org/security DokuWiki's security page] for your web server.  Most popular web servers are covered but there are generic instructions as well.
  
If anyone would like to add a vhost setup guide please feel free to add it.
+
The package in [community] unpacks DokuWiki at {{filename|/srv/http/dokuwiki}} and changes ownership to the "http" user. This should work fine for most popular web servers as packaged for Arch.
  
==== lighttp Notes ====
+
== Installation ==
  
See [[Fastcgi_and_lighttpd]] for more details.
+
# Install your web server of choice (e.g. [[Apache]] or [[lighttpd]]) and configure it for [[PHP]].  As mentioned above, DokuWiki has no need for a database server so you may be able to skip those steps when setting up your web server.
 +
# Install {{Package Official|dokuwiki}} from [community] with [[pacman]].
 +
# With your web browser of choice, open <nowiki>http://&lt;your-server&gt;/dokuwiki/install.php</nowiki> and continue the installation from there.
  
The html root is located under /srv/http. This directory may not be created by default, so create it if not.
+
Alternatively, if you would like to install from tarball, you can read from http://www.dokuwiki.org/Install.  Generally the procedure is the same as above.  Instead of using pacman, you will need to [http://www.splitbrain.org/projects/dokuwiki download the tarball], unpack it to your server's document root (e.g. {{filename|/srv/http/dokuwiki}}), and chown to the appropriate user (e.g. "http").
  #mkdir -p /srv/http
+
lighttp also creates (or uses) the user account and group of http:http.
+
  #chown http:http /srv/http
+
  
All of these settings can be changed in the file
+
=== lighttpd Specific Configuration ===
  /etc/lighttpd/lighttpd.conf
+
  
==== DokuWiki Notes ====
+
Edit the {{filename|/etc/lighttpd/lighttpd.conf}} file as per the [http://www.dokuwiki.org/install:lighttpd dokuwiki instructions] (might contain updated information).
 
+
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-cgi
+
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
+
Create a test document
+
  #echo "Testing lighttpd" > /srv/http/index.html
+
Open a web browser to http://127.0.0.1/, and you should see the test document.
+
 
+
If it didn't work try (and check again):
+
chown -R http:http /var/run/lighttpd/
+
 
+
Stop the webserver
+
  #/etc/rc.d/lighttpd stop
+
 
+
=== Configuration ===
+
 
+
Uncomment these lines in /etc/lighttpd/lighttpd.conf
+
<pre>
+
"mod_fastcgi"
+
</pre>
+
<pre>
+
fastcgi.server            = ( ".php" =>
+
                              ( "localhost" =>
+
                                (
+
                                  "socket" => "/var/run/lighttpd/php-fastcgi.socket",
+
                                  "bin-path" => "/usr/bin/php-cgi"
+
                                )
+
                              )
+
                            )
+
</pre>
+
 
+
== Installing DokuWiki ==
+
=== Downloading the Latest Version ===
+
Go to the [http://www.splitbrain.org/projects/dokuwiki DokuWiki download] site and get the latest version
+
  #tar -C /srv/http -zxvf dokuwiki*.tgz
+
  #mv /srv/http/dokuwiki-DATE /srv/http/dokuwiki
+
 
+
=== Preparing the Installation Files ===
+
chown the DokuWiki files
+
  #chown -R http:http dokuwiki/
+
(http 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/lighttpd/lighttpd.conf file as per the [http://www.dokuwiki.org/install:lighttpd dokuwiki instructions] (might contain updated information).
+
  
 
Under the line:
 
Under the line:
Line 114: Line 56:
 
</pre>
 
</pre>
  
''These entries give some basic security to dokuwiki.'' lighttpd does not use .htaccess files like apache. You CAN install with out this, but I would NEVER recommend it.
+
''These entries give some basic security to DokuWiki.'' lighttpd does not use .htaccess files like Apache. You CAN install with out this, but I would NEVER recommend it.
  
=== Restart lighttp ===
+
Restart lighttp:
Start your webserver
+
   # /etc/rc.d/lighttpd restart
   #/etc/rc.d/lighttpd start
+
 
+
=== Install DokuWiki ===
+
Open a webbrowser to
+
  http://127.0.0.1/dokuwiki/install.php
+
  
 
== Post Installation ==
 
== Post Installation ==
 
=== Cleaning Up ===
 
=== Cleaning Up ===
 
'''After configuring the server remove the install.php file!'''
 
'''After configuring the server remove the install.php file!'''
   #rm /srv/http/dokuwiki/install.php
+
   # rm /srv/http/dokuwiki/install.php
  
 
=== Installing Plugins ===
 
=== Installing Plugins ===
 
+
Many community created plugins can be found [http://www.dokuwiki.org/plugins here]
Many community created plugins can be found [http://wiki.splitbrain.org/wiki:plugins here]
+
  
 
They can be added through the web interface (as well as updated) through the Admin menu.
 
They can be added through the web interface (as well as updated) through the Admin menu.
Line 144: Line 80:
 
== Further Reading ==
 
== Further Reading ==
  
The DokuWiki [http://www.dokuwiki.org/ main site] has all of the information and help that you could possibly need.
+
The [http://www.dokuwiki.org/ DokuWiki main site] has all of the information and help that you could possibly need.

Revision as of 18:16, 12 July 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

"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, DokuWiki is a wiki written in PHP and requires no database.

Like to see a running example?

Initial Notes

DokuWiki should work on any web server which supports PHP 5.1.2 or later. As the requirements may change over time, you should consult the requirements page for DokuWiki for additional details.

It is strongly recommend to read through the appropriate sections of DokuWiki's security page for your web server. Most popular web servers are covered but there are generic instructions as well.

The package in [community] unpacks DokuWiki at Template:Filename and changes ownership to the "http" user. This should work fine for most popular web servers as packaged for Arch.

Installation

  1. Install your web server of choice (e.g. Apache or lighttpd) and configure it for PHP. As mentioned above, DokuWiki has no need for a database server so you may be able to skip those steps when setting up your web server.
  2. Install Template:Package Official from [community] with pacman.
  3. With your web browser of choice, open http://<your-server>/dokuwiki/install.php and continue the installation from there.

Alternatively, if you would like to install from tarball, you can read from http://www.dokuwiki.org/Install. Generally the procedure is the same as above. Instead of using pacman, you will need to download the tarball, unpack it to your server's document root (e.g. Template:Filename), and chown to the appropriate user (e.g. "http").

lighttpd Specific Configuration

Edit the Template:Filename file as per the dokuwiki instructions (might contain updated information).

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 DokuWiki. lighttpd does not use .htaccess files like Apache. You CAN install with out this, but I would NEVER recommend it.

Restart lighttp:

 # /etc/rc.d/lighttpd restart

Post Installation

Cleaning Up

After configuring the server remove the install.php file!

 # rm /srv/http/dokuwiki/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 DokuWiki, 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:

 /dokuwiki/data/  =>  All User Created Data
 /dokuwiki/lib/plugins/  =>  All User Added Plugins

Further Reading

The DokuWiki main site has all of the information and help that you could possibly need.