Quick Setup of Apache, PHP, IMAP and TWIG
-----------------------------------------

This is the quick and dirty documentation, for complete details about
the individual packages, please see the documentation included with the
various packages.

This procedure does not include setup of a database at this time.

This procedure was completed on a basic installation of RedHat Linux
5.2, other distributions of Linux may vary slightly.

It is assume that you are logged in as root during the installation.

Now on to the good stuff...

---

1 - download:
	ftp://ftp.php3.com/pub/php-3.0.16.tar.gz
	ftp://ftp.apache.org/dist/apache-1.3.12.tar.gz
	ftp://ftp.cac.washington.edu/imap/imap-4.7.tar.Z
	http://screwdriver.net/twig/download/twig-2.4.0.tar.gz

    in to a directory that you can work in (i.e. /home/progs)

2 - decompress the above:
	gzip -d php-3.0.16.tar.gz
	gzip -d apache-1.3.12.tar.gz
	gzip -d imap-4.7.tar.Z
	gzip -d twig-2.4.0.tar.gz

3 - untar the above
	tar -xvf php-3.0.16.tar
	tar -xvf apache-1.3.12.tar
	tar -xvf imap-4.7.tar
	tar -xvf twig-2.4.0.tar

4 - build IMAP
	change in to imap-4.7
	run make <system type> 
	(where system type is slx for linux with shadow passwords)
	change in to c-client
	run ln -s /home/progs/imap-4.7/c-client lib
	run ln -s /home/progs/imap-4.7/c-client include
	(I'm not sure why the links are required but it's the only 
	 way I've been able to get php to compile...)
	
5 - configure apache
	change into ../apache-1.3.12
	run ./configure

6 - configure and make php
	change into ../php-3.0.16
	run ./configure --with-apache=../apache_1.3.12 --enable-track-vars --with-imap=/home/progs/imap-4.7/c-client
	(note the full path in the --with-imap setting, 
	 it is REQUIRED to be the full path)
	run make
	run make install

7 - re-configure, build and install Apache
	change into ../apache-1.3.12
	run ./configure --activate-module=src/modules/php3/libphp3.a
	run make
	run make install
	
8 - configure apache
	edit apache's httpd.conf file and change the following lines:
	
		Add index.php3 to the DirectoryIndex line
		In the <Directory rootdir> section change AllowOverride to All

	Add the following line:

		AddType application/x-httpd-php3 .php3

	Add any other options you need for apache.

	At this time you may want to add apache to your startup 
	scripts to autostart each time you restart your system.

	run apachectl start, to start apache

9 - install twig
	change into ../twig-2.4.0
	run ./twig-install <doc root>/twig 
	(or where ever you want twig installed)
	
10 - configure twig
	change to the directory you installed twig to.
	change to the config directory
	edit config.inc.php3, dbconfig.inc.php3, header.inc.php3, 
	footer.inc.php3 and announcements (see twig's INSTALL file for details)

11 - test twig
	start a web browser and go to your 
	twig root directory and see if it works

12 - done
	if you have any problems, take a look in 
	twig's INSTALL file for some common problems

