Computer: TWiki Installation (aus Wiki)

Gehört zu: Wiki
Siehe auch: TWiki, Notizen

TWikiInstallation (aus Wiki)

Installation von TWiki

Am 28.12.2003 habe ich TWiki auf meinem Windows 2000 Notebook installiert. Dabei habe ich mich ganz genau nach dem Cookbook TWiki:TWiki.WindowsInstallCookbook gerichtet; d.h. mit Cygwin und Perl 5.6 unter Cygwin. Einzelheiten hier:

Warum ich TWiki für mich ausgewählt habe und weiteres zum Thema WikiWiki habe ich unter WikiWikiWebMain zusammengestellt.

Re-locking RCS files

First, some testing: in your browser, go to http://yourdomain.com/bin/testenv – this provides a lot of detail, including warnings. Write down the Apache server’s userid that is given by this script – typically either ‘system’ or ‘administrator’ – I’ll assume ‘system’ from now on.

  • If the testenv script doesn’t work, go back and check the configuration of the Apache httpd.conf file, and TWiki.cfg. Have a look at the Apache error log, c:/apache/logs/error_log, and the TWiki error log, /twiki/data/log*.txt.

This ‘system’ user must own the locks on the RCS files, which are shipped with the lock held by ‘nobody’. The reason this matters is that no revisions will be tracked by RCS unless the Apache userid matches that of the RCS file locks.

You can re-lock files using rcs -u and rcs -l, but it’s a painfully manual process. Instead, just use Perl again to mass-edit all the RCS files, as follows:

  • NOTE: The ‘NR <= 10’ part of the Perl command ensures that it only operates on the first 10 lines, to avoid editing the body of RCS files for topics that happen to include the text ‘nobody:’ (like this one…)
$ cd /twiki/data
$ : Make a backup of all files
$ tar czvf all-files.tar.gz */*
$ : Test edit a single file to check your typing
$ perl -pi~~~ -e 'NR <= 10 && s/nobody:/system:/ ' Main/WebIndex.txt,v
$ diff Main/WebIndex.txt,v Main/WebIndex.txt,v~~~
5c5
<		 system:1.2; strict;
---
>		 nobody:1.2; strict;
$ : Now edit all the RCS files at once - use cursor-up to recall previous command
$ perl -pi~~~ -e 'NR <= 10 && s/nobody:/system:/ ' */*,v

$ : Check for any remaining files not edited
$ grep 'strict;$' */*,v || grep -v system
$ : Clean up - type this very carefully 
$ rm */*~~~
  • If something goes wrong: to restore your existing files from the backup, just type tar xzvf all-files.tar.gz and all your files, both .txt and .txt,v, will be back as they were before the edits.

You have now re-locked all the RCS files and are almost ready to start using TWiki!

— Main.DietrichKracht – 20 Mar 2004