dokuwiki

I’ll keep a wiki in wwwroot installed via the apt-get tool and onother in /usr/local/html/dokuwiki with manual installation.

All documentation and additional information is maintained in the DokuWiki at wiki.splitbrain.org.

Apt install

sudo apt-get install dokuwiki 
#creates /etc/dokuwiki /usr/share/dokuwiki /var/lib/dokuwiki
#pages in /var/lib/dokuwiki/data

Configure apache

sudo ln -s /etc/dokuwiki/apache.conf /etc/apache2/conf.d/dokuwiki.conf
sudo cp apache.conf apache.conf.dist
sudo vi apache.conf
2 dd
        order allow,deny
        allow from 127.0.0.1

Manual install

cd ~/tmp
wget http://www.splitbrain.org/Programming/PHP/DokuWiki/dokuwiki-rc2006-10-08.tgz
cd /usr/local/html
sudo tar xvfz ~/dokuwiki-rc2006-10-08.tgz
mv dokuwiki-rc2006-10-08.tgz wiki
cd wiki
#  Create an empty logfile
sudo touch data/changes.log

Access control

To use the access control (ACL) features:

cd conf/ # /etc/dokuwiki
sudo cp users.auth.php.dist users.auth.php
echo -n "*passwd*" | md5sum
sudo vi users.auth.php
# user:MD5password:Real Name:email:groups,comma,separated
jlopes:c2eb41f0865bbe12e2595de7d2b6093e:Correia Lopes:jlopes@fe.up.pt:doc,proj,upload
sudo cp acl.auth.php.dist acl.auth.php
sudo vi acl.auth.php
*               @ALL        1
*               @admin      4

Configuration

Local info:

sudo cp local.php.dist local.php
sudo vi local.php
$conf['dmask']        = 0002;     // directory mask accordingly
$conf['title']        = 'jlopes'; // what to show in the title
$conf['useacl']       = 1;        // Use Access Control Lists to restrict access?
$conf['superuser']    = 'jlopes'; //The admin can be user or @group
$conf['openregister'] = 0;        // users are NOT allowed to register themselves
$conf['authtype']     = 'plain';  // plain text backend (default

Permissions for apache process:

sudo chgrp www-data users.auth.php acl.auth.php
sudo chmod 664 users.auth.php acl.auth.php
cd ..
mkdir data/cache
#change owner & group
find data -print0 | sudo xargs -0 chown -v jlopes:www-data
#change permissions
find data -type f -print0 | sudo xargs -0 chmod -v ug=rw,o=r
find data -type d -print0 | xargs -0 chmod -v ug=rwXs,o=rX

Installing Templates

To install templates, follow these instructions:

  1. Download the template (usually a tgz or zip file).
  2. Unzip that zip file (which contains all needed template files) into the lib/tpl/ folder1).
  3. In the conf/dokuwiki.php file (or better in your personal conf/local.php) set $conf['template'] = '<templatename>'; or open up Configuration in Admin Section of Dokuwiki and choose your template from the list.

Your dokuwiki should now appear in the new template.

See also 'Templates' in mail archive

arctic Template

cd lib/tpl/
sudo tar xvfz ~/template-arctic-2006-05-21.tgz
cd ../../conf
sudo vi local.php
$conf['template'] = 'artic';
sudo vi lib/tpl/arctic/default.php

sidebar Template

cd /usr/local/html/lbd/lib/tpl
tar xvfz ~/template-sidebar.tar.gz
vi sidebar/tplfn_sidebar.php # settings
vi ../../conf/local.php
$conf['template'] = 'sidebar';

Pluggins

A bibtex plugin for DokuWiki

  1. Download the zip file bibtex.zip
  2. Unzip
  3. Copy to your dokuwiki lib/plugins directory

Latex Block Parser

sudo apt-get install tetex-base latex-ucs imagemagick gs-common
wget http://darcs.erazor-zone.de/php/dokuwiki/latex/latex.tar.gz
mkdir lib/plugins/latex
#get latexrender
mkdir latexrender
cd latexrender
wget http://www.mayer.dial.pipex.com/latexrender.zip
unzip latexrender.zip
cp otherPHP/latexrender/class.latexrender.php ../lib/plugins/latex
cd ..
rm -rd latexrender
#modify paths
vi lib/plugins/latex/class.latexrender.php
cd lib/plugins/latex/
wget http://darcs.erazor-zone.de/php/dokuwiki/latex/syntax.php

ISBN

  1. make a new file and name it syntax.php and paste this code in it and save it!
  2. make a directory which name is isbn under [dokuwiki’s home]/lib/plugins
  3. Put the made php file in the folder made above.

Syncronise sites

Sync two sites with unison:

#change owner to jlopes
find data -print0 | sudo xargs -0 chown -v jlopes:www-data
#change permissions
find data -type f -print0 | sudo xargs -0 chmod -v ug=rw,o=r
find data -type d -print0 | xargs -0 chmod -v ug=rwXs,o=rX

Script to sync:

vi ~/local/bin/sync-doku
#!/usr/bin/bash
unison /usr/local/html/dokuwiki/data ssh://jlopes@jclux.fe.up.pt//usr/local/html/dokuwiki/data -fastcheck yes -ignore 'Path data/cache' -batch

Jose Gaspar 2006/10/20 21:07

1) If the zip file does not contain a folder itself, you have to create lib/tpl/<templatename> and unzip the template files into that one instead.
dokuwiki.txt · Last modified: 2006/10/20 21:08 by jgaspar
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0