by May 5, 2003 0 comments



WikiWikiWeb, WikiName, WabiSabi…. Do all these names mean anything to you? If yes, you are already clued into a cool Web-based democratic collaboration initiative. If no, here’s your chance to get a low-down on it. And get your very own TWik–a Wiki clone-based collaboration environment on your intranet up and running in a few minutes.

What is Wiki
WikiWiki is the name of Ward Cunningham’s website which is based on open collaboration between users on the content of a website, that is, any page can be edited by anyone. 

The name is derived from Hawaiian WikiWiki which means quick. An interesting philosophy behind Wiki is the Japanese WabiSabi which refers to experiencing beauty in the ever-transient, never-complete, fundamentally imperfect nature of life in the universe. The reference here is to the nature of a Wiki site which can be changed all the time by anyone visiting the site. 

What is TWiki
TWiki is short for TakeFive Wiki, named after the then workplace of Peter Thoeney, who developed TWiki. TWiki allows users to edit any page from any browser. Users can upload documents or pictures and, hence, make them easy to share. To edit TWiki pages, you need not use HTML because TWiki sites can be edited through TWiki shorthand. For instance, to write something in bold, you can just use the shorthand *Bold* (put two asterisks around the word) or italics is _Italics_. There is a concept of WikiWords in which two words are written without spaces and with their each of their first letter in capital. These words get hyperlinked automatically and can be used to create a separate thread of discussion instantly. Using the GNU Revision Control System (RCS), TWiki also logs changes made and different separate revisions can be browsed through. 

TWiki has many interesting features that allow simple, quick and fun collaborations on it. So let’s get started. 

TWiki’s welcome
screen

How to Install
TWiki works primarily on Linux, but can also be confgured on Windows using cygwin–the Linux shell in Windows. We tried both and had a better experience running TWiki on Linux (PCQLinux 8.0) than Windows (XP Pro. The installation on Windows was very elaborate and cumbersome). 

Besides the TWiki tar ball, here’s what else you need:

  • Apache (recommended 1.3.7 and is on this month’s CD)
  • Perl (recommended 5.6.1 and is on this month’s CD. We tested with 5.8 and while TWiki worked fine there are known
    issues that are listed on the TWiki site.)
  • RCS (Revision Control System 7.0. Aavailable with PCQ Linux8.0)

Please note that we are assuming you have root access to the Linux box where you want to set up TWiki. If you don’t, there are some workarounds mentioned in TWiki’s installation documentation you might want to check out. 
If you already have Apache 2.0 installed (default in PCQLinux8.0), you may be able to set up and run TWiki on it, but there are known issues with this version of Apache, notably not being able to authenticate users. Since you have ready access to the recommended Apache version, you can install the older Apache in a different path from Apache 2.0, generally /usr/local/ apache and run it from there. This is because dependencies on Apache 2.0 may not allow you to un-install it from your system. 

To run Apache from a different path:

# /usr/local/apache/bin/apachectl start

The installation document mentions non-standard Perl module SMTP which you don’t need 
if you’ve got sendmail that 
usually comes with any Linux distribution. 

Once you’ve got the required components in place, you are ready to set up
TWiki. 

Step  1

Sample of an edited TWiki page

Unpack TWiki
The first thing to do is unpack TWiki. The documentation suggests creating a folder httpd in /home and storing TWiki files there. By doing so, you can blindly copy the onfiguration lines that go in apache’s httpd.conf and also TWiki.conf, otherwise you will have to change the location of TWiki files in the configurations. 

We succumbed to the temptation of easy configuration and unpacked TWiki in /home/httpd/ twiki. The command is:

# tar -zxvf TWiki20030201.tar.gz -C /home/httpd/twiki/

Step 2

Configure Apache
TWiki runs on a Web Server so you need to configure the Apache configuration files to access TWiki pages from a browser. Open the Apache configuration file httpd.conf located generally in /etc/httpd/conf/httpd.conf or if you install apache1.3.7 from the tar ball without specifying a location, then in
/usr/local/apache/ conf/httpd.conf. 

Add the following entries to make sure TWiki’s HTML and, more importantly, PERL pages are accessible correctly.

Append these lines where you see Alias entries in the Apache conf file. 

ScriptAlias /twiki/bin/ “/home/httpd/twiki/bin/”
Alias /twiki/ “/home/httpd/twiki/”
<Directory “/home/httpd/twiki/bin”>
Options +ExecCGI
SetHandler cgi-script

Allow from all
</Directory>
<Directory “/home/httpd/twiki/pub”>
Options FollowSymLinks +Includes
AllowOverride None
Allow from all
</Directory>
<Directory “/home/httpd/twiki/data”>
deny from all
</Directory>
<Directory “/home/httpd/twiki/templates”>
deny from all
</Directory>

Restart Apache and open the location: http://<yourdomainnameOrIPaddress>/twiki/

# /etc/httpd/bin/apachectl restart 

Or restart the apachectl script from the path where you have put Apache. 

Step 3

Change Perl files
Path to Perl. TWiki is Perl-based. The Perl code files are stored in /home/httpd/twiki/bin. Here the path to Perl needs to be set if Perl is located anywhere else besides /usr/bin/perl (standard). 

To do that, execute the following command: 

# perl -pi~ -e ‘s;#!/usr/bin/perl;#!the/new/path/perl;’ *[a-z]

You can alternatively make a symbolic link to perl on your system in /usr/bin/perl: 

# ln —s /usr/bin/perl the/new/path/perl
File Permissions. Perl files need to have execute permissions. This can be done by
chmod

# cd /home/httpd/twiki/bin 
# chmod 755 *

File Ownership and Permissions. The Apache Web Server executes cgi/perl scripts under the ownership of user nobody. However, some Linux distributions use a different owner (for example, Debian used www-data). In this case, you need to change the ownership of all scripts to the user the server runs them as. You can find out this user name by running the ‘testenv’ script from twiki/bin from the browser: 

http://<yourdomainnameOrIPaddress>/twiki/bin/testenv

This script will show up all the settings of your Web server related to TWiki and the TWiki configuration itself. It will also show errors and warnings which you can take care of. 

If the owner is not nobody, you will have to change the ownership of the script files as well as all the RCS *.txt,v files present in
twiki/data/ 

This can be done by executing a perl line: 

# cd twiki/data
# perl -pi~ -e ‘s/nobody:/www-data:/’ */*,v

Set the permission of the twiki/data directory and its subdirectories so that files in there are writable by user nobody. A simple way is to chmod them to drwxrwxr-x (775) and to chown them to nobody.

# cd /home/httpd/twiki
# chmod 775 data —R 
# chown nobody data —R

Set the permission of the twiki/pub directory and all its subdirectories so that files in there are writable by user nobody. A simple way is to chmod them to drwxrwxr-x (775) and to chown them to nobody. 

# cd /home/httpd/twiki
# chmod 775 pub —R 
# chown nobody pub —R

Step 4

Configure twiki.conf
Edit the file twiki/lib/TWiki.cfg and set the variables as per your needs, specifically, the section titled “Changes to make for a new server”. Here you will be able to set $defaultUrlHost, $pubUrlPath, $pubDir etc. 

Here you can also set up the mail program that will be used to send email notifications to new users and send alerts about changes to the TWiki pages to draw them to the site. 

Check your configuration by running the script ‘testenv’ again as decribed above. 

Step 5

Set up User Authentication
You are now all set to use TWiki. Users can browse the TWiki site and edit content as they please, but all users will be given the same identity TwikiGuest. For better, clearer collaboration, you might want that only registered users access TWiki. For that, go to the /home/httpd/twiki/ bin/.htaccess.txt file and rename it to .htaccess. Also in Apache’s httpd.conf, go to the Directory section where you’ve previously defined the /home/httpd/ twiki/bin directory and change the line “Allow from all” to “AllowOverride None”. Now Apache will authenticate users. 

Your TWiki is now running and you can get your colleagues and friends to meet on your TWiki
site. 

You will find the latest documents and happenings regarding TWiki at http://twiki.org.

Shruti Pareek

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

Your data will be safe!Your e-mail address will not be published. Also other data will not be shared with third person.