NEEDED PACKAGES
===============
 postgres
 libpgperl
 postgres-dev ?
 Several Perl modules, located in perlmods subdir of timesheet dist.
 webserver with cgi execution enabled, and .htaccess style authentication. 


INSTALLATION
============


Installation on Debian Linux:

  make install-debian

Installtion on RedHat Linux (should apply to Caldera OpenLinux as well):
 
   make install


INSTALLATION NOTES
==================

Be sure to have cgi execution enabled for the timesheet installation
directory.  If you are running apache, you can do so by adding the
following stanza to your access.conf (under RedHat Linux,
/etc/httpd/conf/access.conf).  Replace "/timesheet" with the relative
URI path to the timesheet application.

<directory /timesheet > 

Options +ExecCGI
AddHandler cgi-script .cgi

</directory> 


Make sure, too, that postgres is running.  On a Linux distribution
that uses SysV style init scripts, the command to start will 
be along the lines of "/etc/rc.d/init.d/postgresql start". 

Postgres needs to be listening on a TCP/IP socket for timesheet to
function properly.  By default, Debian and RedHat do not have postgres
doing so. For Debian, edit /etc/postgresql/postmaster.init, uncomment
the PGALLOWTCPIP line and change the 'no' to 'yes' so it looks
like this:

PGALLOWTCPIP=yes

To enable for RedHat the important line in /etc/rc.d/init.d/postgresql
reads as follows:

su postgres -c '/usr/bin/postmaster -S -D/var/lib/pgsql'

postmaster needs to be started with the "-i" switch to 
have it listen for IP conections, so modify accordingly: 

su postgres -c '/usr/bin/postmaster -i -S -D/var/lib/pgsql'


For more details, see postmaster (1); 



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
All of the following is obsolete and only here for historical purposes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Perl Modules setup
	cp the *.pm files in the perlmod subdir to the proper location for
	site specifc perl modules, which in Debian is:
		/usr/local/lib/site_perl

postgres setup:
 + needs postmaster listening (port 5432)
 + needs timesheet database instanced:
	> createdb timesheet
 + 'createuser wwwdata' if not existing
	NOTE: createuser won't accept a userid w/ the default name of the
	  Debian web server, www-data.  You'll need to hack up the UID
	  of Apache or whatever so that it is 'wwwdata' instead of 'www-data'
	An alternate strategy is to change the name www-data to be wwwdata
	which is a valid postgres UserID, and then make sure to fix your
	webserver configuration to run under that user.  UIDs will be the
	same so you only have to modify references to "www-data" by name.

 + grant update and install permissions on all 4 tables to wwwdata:
    'grant select,update,insert,delete on client,hours,personnel,job to wwwdata;'

 + populate data -- you can use pg_dump on the existing tables; you 
   want the following tables, or a subset of them: 'hours job
   personnel client'; then populate the data on your test machine:
   'psql -q -f <file> timesheet'

webserver setup:
	+ Add *.cgi exec capabilities to the directory containing timesheet
	so that it can properly run it's scripts
	+ Passord protect this directory, making sure that the password file
	you tell the webserver to use, is the same one you tell timesheet
	to use later when you configure timesheet.conf.

Timesheet Configuration:
	+ The file lib/timesheet.conf is the configuration file for all
	relevant timesheet variables.  Some important ones:
		o ORG - Set to your Organization

		o TIMESHEET_URL - set to the startup URL for your timesheet
		installation.  This is used for all sorts of things in the
		scripts themselves.

		o DBADDR/SQLDB - These tell timesheet where to find the DB.
		The defaults should work.

		o EXPORTDIR/EXPORTGID - configure where export files are
		written and with what permissions they are created.

		o PASSFILE - tells timesheet which htpasswd file controls
		access to it.  This must be the same as the one you configured
		the webserver to use to protect the timesheet subdir.


