Quick Setup of Twig in a RedHat (or Mandrake)
---------------------------------------------

1.- Prerequisites
I will assume that you have installed the following packages:
	- apache: the default installs everything we need (including PHP)
	- postgresql: defaults too
	- imap: Only if the mail server is this machine (not my case)
	- php-imap

2.- Installing twig
* Where to install? 
	- Type:     
		grep DocumentRoot /etc/httpd/conf/srm.conf

	  Suppose the result is: 
		DocumentRoot /homes/httpd/html

	  Then the easiest way to install twig is:
		./twig-install /homes/httpd/html/twig

	  (I will assume that the install dir is /homes/httpd/html/twig)
3.- Configuring apache
	* Edit /etc/httpd/conf/srm.conf
	- Find the line beginning with "DirectoryIndex"
	- Add "index.php3" if it's not there. It must be like:
		DirectoryIndex index.html index.shtml index.cgi index.php3
	- Find the lines related to php and uncomment them. The lines are: 
		AddType application/x-httpd-php3 .php3 
		AddType application/x-httpd-php3-source .phps
		AddType application/x-httpd-php .phtml    

	* Edit /etc/httpd/conf/httpd.conf
	- Find the lines related to php and uncomment them. The lines are: 
		LoadModule php_module modules/mod_php.so 
		LoadModule php3_module modules/libphp3.so 
		AddModule mod_php.c
		AddModule mod_php3.c 

4.- Configuring postgresql
	- Start daemon if not yet started:
		/etc/rc.d/init.d/postgresql start
	- Create a postgresql user "nobody"
		su -
		su -l postgres
		createuser nobody
			Default everything
			Create database... yes
			
	- Follow the instructions in the file "Setup-pgsql.txt"

7.- Configuring twig
	- cd /homes/httpd/html/twig/config
	- edit config.inc.php3
	  Change everything you need. In my case:
		$config["fromdomain"]           = "mydomain.es";
		$config["language"]             = "spanish";
		$config["spellcheck"]           = "/usr/bin/ispell -a -d spanish -t latin1";
		$config["imap_server"]          = "pop.mydomain.es";
		$config["smtp_server"]          = "mail.mydomain.es"; 
	- edit dbconfig.inc.php3
	  Change the "sqltype" line to:
		$dbconfig["sqltype"]               = "pgsql";

6.- Starting all
	- Start imapd if you need
	- (re)Start apache
		/etc/rc.d/init.d/httpd restart
	- (re)Start postgresql
		/etc/rc.d/init.d/postgresql restart

7.- Trying it
	- Start a browser which can use cookies
	- Go to:
		http://mydomain.es/twig
	- Enjoy this fabulous piece of software

--------
Version 0.1   -   20-Jun-2000
Fernando Monera Daroqui <monera@bitmailer.net>
