Differences between revisions 10 and 11
Revision 10 as of 2013-12-01 05:24:56
Size: 9723
Editor: ?EwaldvanGeffen
Comment:
Revision 11 as of 2013-12-20 23:27:33
Size: 9595
Editor: ?EwaldvanGeffen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 202: Line 202:

'''?''' Can we have multi-crazy-farm fun with a any host specifer in the apache site-config? Alias *.overlycomplicated.net

Translation(s): English - Français - Italiano


DokuWiki

DokuWiki is available in the official Debian repository and is installable through the usual Debian tools.

Specificities of the Debian package

Contrary to a standard installation, the Debian package:

  • is managed by the package manager (of course), which allows you to get upgrades and security updates along with the your system;
  • has specific paths, basically:
    • DokuWiki root is /usr/share/dokuwiki,

    • wiki data is /var/lib/dokuwiki/data,

    • configuration is /etc/dokuwiki;

  • is initially configured by the package manager, not by the install web page;
  • manages the configuration of your web server to give you access to your wiki too;
  • uses packaged libraries instead of some embedded ones such as Geshi and SimplePie.

Some of these specificities come from the packaging system itself, some are to comply with the Debian policy. This has:

  • some advantages: system integration, easy initial configuration.
  • some drawbacks: unusual file paths and some specific bugs.

Specific problems

The full list of bugs filed against the Debian package can be found here. Here are the most important problems you may encounter:

  • The RSS feature will not work with the Debian Squeeze version, because of a library incompatibility. If you need this feature you will have to use a more recent version from the #backports or to install DokuWiki manually without using the Debian package.

  • Some plugins may break because of the specific file layout.

Bugs reports

Please report bugs in the package using the Debian bug tracking system. See also the current list of bugs.

Installation

   sudo apt-get install dokuwiki

Configuration files are in /etc/dokuwiki/.

Data files are in /var/lib/dokuwiki/.

Your dokuwiki is available at: http://localhost/dokuwiki

Starting with Debian Lenny and Squeeze with #backports, it asks you some questions for the initial configuration:

  • the web servers to configure and whether or not to restart them to apply the configuration;
  • the web path where your wiki is to be available, that is, /dokuwiki, /wiki or whatever;

  • the access scope of your wiki: local host, LAN or Internet;
    • if you choose LAN, your LAN IP address range;
  • whether or not to remove the wiki data when purging the package;
  • whether or not to allow configuration and plugin administration from the web interface;
  • the wiki title, license and ACL;
  • wiki admin name, password, full name, email address and password.

All these questions do not have the same priority:

  • low: those whose default values are relevant in most cases, for instance web path (default /dokuwiki);

  • medium: those with a reasonable default value, for instance wiki admin name (default “admin”);

  • high: those whith no reasonable default value, for instance wiki admin password (no default!).

The package will only ask you the questions which priority is higher than the one that you chose globally to be bothered with; you can set this parameter by reconfiguring the package debconf: # dpkg-reconfigure debconf

For instance, if you chose to be bothered with high priority questions only, you will not be asked for all the DokuWiki package questions. You can still reconfigure the package dokuwiki itself to get all the questions: # dpkg-reconfigure dokuwiki

Backports

The package versions can be a bit outdated, specially if you are using an old Debian version such as Lenny (oldstable). Updated packages are available using the backports repository. For instance, for Lenny:

# echo "deb http://backports.debian.org/debian-backports lenny-backports main" >> /etc/apt/sources.list
# apt-get update
# aptitude install dokuwiki/lenny-backports

Usage

After installation of the package, your dokuwiki install is available at http://localhost/dokuwiki/ (replace //localhost// with the name or IP address of your server if it is not your local computer).

Starting with Debian Squeeze and Lenny #backports, your wiki is completely usable after installation, so start using it and skip the #Lenny section that is not for you. With Lenny without backports, the initial configuration is limited though, so read the next section.

Lenny

Please upgrade your system to Squeeze or use the package from the #backports! If you really do not want to do that, read on.

For a full access from the lan or from internet, edit the */etc/apache/conf/dokuwiki.conf* file and change *127.0.0.0* to *All* for Apache2: /etc/apache2/conf.d/dokuwiki.conf

You'll likely need to restart apache for this to take effect.

For a full config that includes login and adminstration from within the wiki you have to enable ACL and change some configs. You need root privileges to use the commands.

  • copy /etc/dokuwiki/local.php.dist to /etc/dokuwiki/local.php and edit according to your local needs. Make sure, the option useacl is enabled.

  • allow www-data to read and write the config files
    • chown -R www-data /etc/dokuwiki/

    • chown -R www-data /usr/share/dokuwiki/lib/

  • copy the disabled examples of authentification files to where dokuwiki expects them (or run the ?:installer):

    • cp /etc/dokuwiki/acl.auth.php.dist /var/lib/dokuwiki/acl/acl.auth.php

    • cp /etc/dokuwiki/users.auth.php.dist /var/lib/dokuwiki/acl/users.auth.php

Configuration of multisite support (farm) with virtual hosts

This option is only available in version 0.0.20101107-4 or later. We'll show how to create two dokuwiki sites in a virtual host-based setup.

Virtual Hosts

Create two minimal virtual hosts (using apache server for this example):

/etc/apache2/sites-available/cat

<VirtualHost *:80>
   ServerName cat.yourdomain.tld
   DocumentRoot /usr/share/dokuwiki
</VirtualHost>

/etc/apache2/sites-available/dog

<VirtualHost *:80>
   ServerName dog.yourdomain.tld
   DocumentRoot /usr/share/dokuwiki
</VirtualHost>

Enable the sites:

sudo a2ensite cat dog

And reload your server

sudo service apache2 reload

Add more directives to your virtual hosts if necessary (omitted here to simplify the example). Look at /etc/dokuwiki/apache.conf for a more complete default configuration.

Create dokuwiki sites

To create a new site, you can use the command dokuwiki-addsite(1):

sudo dokuwiki-addsite cat.yourdomain.tld
sudo dokuwiki-addsite dog.yourdomain.tld

We have now two dokuwikis: one at http://cat.yourdomain.tld and the other one at http://dog.yourdomain.tld. They share the dokuwiki code, but have independent configurations and data.

Configuration files are in /etc/dokuwiki/farm/cat.yourdomain.tld and /etc/dokuwiki/farm/dog.yourdomain.tld.

Data files are in /var/lib/dokuwiki/farm/cat.yourdomain.tld and /var/lib/dokuwiki/farm/dog.yourdomain.tld.

Remove dokuwiki sites

sudo dokuwiki-delsite dog.yourdomain.tld

Questions and answers

Feel free to ask questions here:

? Where are data dirs?

(./) Under /var/lib/dokuwiki to comply with the Debian Policy and match the general system layout.

? Can you briefly list all steps necessary for multiple (separate) installations sharing the codebase?

(./) Implementing the farming within the Debian package is a mid-term goal, not achieved yet. Stay tuned.

? Can you install it on Ubuntu.

(./) Yes, because every package in Debian ends up in Ubuntu too. It is not directly maintained though, so things may break.

? How do I restore data from an older install on another machine?

(./) Copy /var/lib/dokuwiki/data from the old installation to the new one. Install the needed plugins manually.

? I installed using the Debian package, that would be the proper way to upgrade DokuWiki?

(./) Upgrade your system (from Lenny to Squeeze for instance) or use a #backport.

? I installed using the Debian package, but now (for whatever reason, e.g. access to latest release early) I want to go use the DokuWiki download installation (which is not Debian policy compatible)

(./) Get DokuWiki, install it following the regular instructions. Then restore your old content:

  • Put your old /var/lib/dokuwiki/data content into the data directory of your new DokuWiki installation.

  • You can also try to restore:
    • your configuration file, that are under /etc/dokuwiki;

    • your plugins, that are under /var/lib/dokuwiki/lib/plugins.

See also


CategoryProposedDeletion: This page largely duplicates http://www.dokuwiki.org/install:debian