Translations of this page?:

Overview

Ubuntu is a port of Debian and therefore the issues that arise for either often have the same answers; differences will be noted.

Package Manager

The package manager is either the command line tool apt-get or the GUI Synaptic Package Manager. One problem with the package manager is that its distributions of Dokuwiki can be behind the Dokuwiki distribution schedule. The Debian package is currently being upgraded to Angua and so one assumes that Ubuntu will follow.1)

File Structure

The package manager creates its own file structure for Dokuwiki.

  • /etc/dokuwiki
    This directory holds all of your configuration files, including the configuration for the apache server.
  • /usr/share/dokuwiki
    The main dokuwiki directory, which is where the web server points to.
  • /var/lib/dokuwiki
    Essentially your data directory

/usr/share/dokuwiki holds three subdirectories:

  1. bin
  2. inc
  3. lib
  4. Ubuntu adds to this two symbolic links:
    • data, which points to /var/lib/dokuwiki
    • conf which points to /etc/dokuwiki

/var/lib/dokuwiki contains the following subdirectories:

  1. acl, which contains the acl files
  2. data, which is the standard Dokuwiki data section
  3. plugins, the plugins directory
  4. tpl, the template directory

Default Settings

The default settings are very restrictive. The package manager sets up a wiki which has only localhost access and where only root can make any changes to the configuration settings and only root can install plugins. The administrator cannot use the Dokuwiki administration facilties which are normally accessed from the admin button. Also, by default the administrator's userid is 'admin'. In the Debian setup, the package manager asks for an administrator password; on Ubuntu it does not.

The default settings can be modified from the command line using the command line tool dpkg-reconfigure:

  sudo dpkg-reconfigure dokuwiki

You can run this tool after the initial install and change the settings to your requirements. For more information on this tool and on the default settings, see the debian installation instructions. To run this program, it should be noted, you must open a copy of the terminal.

Command Line Installation

You do not have to use the package manager to install Dokuwiki. Instead you can download the latest Dokuwiki and follow the Dokuwiki installation instructions. This will give you a standard installation with the usual options and features. See dokuwiki.

Apache Web Server

If you want to make your wiki fully conform to the Dokuwiki security settings, you will have to make a change to the apache configuration file. The apache configuration files are found in /etc/apache2. The one you want to modify is: /etc/apache2/sites-enabled/000-default which is a link to /etc/apache2/sites-available/default. The default settings for apache cause the server to ignore the .htaccess files which Dokuwiki relies on. This is the section of 000-default that you would be most interested in:

<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
</Directory>
 

The AllowOverride None causes the web server to ignore all .htaccess files and Dokuwiki relies on .htaccess files to implement its security. This should be changed to AllowOverride All. There are other settings for AllowOverride, which are detailed in the Apache documentation, but there is generally no danger to using all.

Another reason for enabling .htaccess files is that without reference to .htaccess, you cannot create Dokuwiki nice urls using the htaccess option.

Once you have made the change to 000-default, you will have to restart the apache web server. For this you must open the terminal program and at the command line enter the following command:

  sudo service apache2 restart

Nice URLs using the .htaccess setting

Dokuwiki comes with a distribution copy of the .htaccess file called .htaccess.dist. In the package manager installation, this file will be found in /etc/dokuwiki; in the standard Dokuwiki install it will be found in your top-level dokuwiki directory. Copy this file to .htaccess. Then uncomment all of the commented-out lines except for the https and and xmlrpc entries; you may want to enable these features at a later time but leave them alone initially. Commented lines begin with a hash (number sign), as in:

   #RewriteEngine on

Remove the hash to uncomment the line:

    RewriteEngine on

Uncommenting the lines will create a set of substitutions which the web server will make in order to format nice urls.

The next thing you need to do is to enable apache's rewrite module. Again from the command line:

    sudo a2enmod rewrite

This will update the configuration files; then you must restart the server:

     sudo service apache2 restart

It should be noted that if ever the service command does not work, you can do the same with this command:

   sudo /etc/init.d/apache2 restart

You must always use sudo with these commands because they require root user access.

1) But as of today, 2012/Jan/13, the package manager is at Lemming, which is several years old.
install/debian_ubuntu_extras.txt · Last modified: 2012/01/15 16:34 by 24.79.97.217
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate