Saturday, May 15, 2010

Few Simple Steps to Setup TWiki

TWiki is a Perl based structured Wiki application which can be used as team portal to share documents, presentations, blogs and many more within an organization. Thus it acts as a complete knowledge base. I did the setup for my team (on a Ubuntu Linux Server) and thought probably I should share the installation process, so that more and more people can easily get the benefit from this application-

Installation Steps-

  1. Install Apache Web Server: (httpd-2.2.15.tar.bz2)- http://httpd.apache.org/docs/2.0/install.html
  2. Make sure Perl (v5.10.0) is installed.
  3. Download Twiki- (TWiki-4.3.1.tgz)- http://sourceforge.net/projects/twiki/files/

Decompress using user account (not root), the uncompressed files automatically takes the access permission of the user account which uncompressed it. Place it inside of htdocs i.e. WEB_ROOT folder of Apache Installation e.g. for my setup I placed twiki inside of- /home/pprasanta/apache/htdocs/

  1. Configure TWiki, you can follow these tutorials

http://www.physics.carleton.ca/research/experimental/twiki/INSTALL.html

http://www.gentoo-wiki.info/HOWTO_TWiki

http://galeon.sourceforge.net/TWiki/TWikiInstallationGuide#StepTwo

  1. Give writable permission to “data”, “lib” and “working”. (chmod 777).
  2. Rename 2 existing sample configuration files- twiki_httpd_conf.txt to twiki_httpd.conf (in main folder of /twiki) and LocalLib.cfg.txt to LocalLib.cfg (you can find it in /twiki/bin)
  3. Define twiki lib path in LocalLib.cfg-

$twikiLibPath = "/home/pprasanta/apache/htdocs/twiki/lib";

  1. Update twiki_httpd.conf with the correct absolute (not relative) path of different twiki directories e.g. for my setup, lib path is /home/pprasanta/apache/htdocs/twiki/lib
  2. Update twiki_httpd.conf : Give access only to your IP address to access Configuration section i.e. /bin/configure. This is important as you don’t want unwanted person to change your configuration.

SetHandler cgi-script

Order Deny,Allow

Deny from all

Allow from 127.0.0.1 YOUR_IP

Require user JohnDoe

Satisfy Any

  1. Link the twiki_httpd.conf into http.conf

# TWiki

Include /home/pprasanta/apache/htdocs/twiki/twiki_httpd.conf

  1. Restart Apache and access the configuration page: http:///twiki/bin/configure
  2. When you are doing the configuration for the first time i.e. you are accessing- http:///twiki/bin/configure First time configuration will create- LocalSite.cfg which will store all configuration information of TWiki. /home/pprasanta/apache/htdocs/twiki/lib/LocalSite.cfg
  3. While configurations, for “Store Settings”, use RcsLite (this is the revision control system, which TWiki uses to manage document versions).
  4. If everything goes fine, start using TWiki- http:///twiki/bin/view
  5. IMPORTANT: You need to setup Email Notification setting with you SMTP HOST details. TWiki registration will not work without successful Email Notification setup.

Troubleshooting

  1. Configuration file /home/pprasanta/apache/htdocs/twiki/lib/LocalSite.cfg does not exist. For first time configuration, this error will come as there is no LocalSite.cfg file in your TWiki installation and it will create a new one. Make sure you have already followed step-4 i.e. already given access rights to mentioned directories.
  2. IMPORTANT: If you face problem like Can't locate Unicode/String.pm this means your PERL installation doesn’t have Unicode/String.pm file installed. Run following command as “Root” user to install Unicode/String.pm module- (Depending upon the user account permission, if you run the following command from any other user account doesn’t have sufficient permission, will result in failed String.pm setup)

# perl -MCPAN -e 'install Unicode::String'

Kindly Note:

I am not a TWiki Setup expert; I did this setup for my team and thought a small reference document might help others.

1 comment: