I. Overview

PRepS has two sides to it, a client and a server.  On the server end is
the PostgreSQL database server, the PRepS database schema, and the stored
procedures and triggers that make PRepS work.  The client side is the user
interface.

The libPRepS package can be thought of as the "server" side of PRepS.  The
libPRepS package contains the scripts used to setup the database on the
server.  It also contains the libpreps library, which contains functions
that are imported into the PRepS database for use by the database server.

If your whole network consists of one machine, then that one machine is the
"client" and the "server".


II. Requirements

  Glib 1.2.x
  PostgreSQL v7.x

If you would like to use PRepS with PostgreSQL v6.5.x, please read the 
online documentation BEFORE ./configure'ing and make'ing PRepS.  The 
online documentation can be found at the PRepS web site:

http://webpages.charter.net/stuffle/linux/preps/preps.html#docs


III. Make and Install

Assuming that you have Glib and PostgreSQL installed correctly, all you
should have to do to build PRepS is:

Step 1: build
  ./configure
  make
  #become root if necessary
  make install

Step 2: configure
  update /etc/ld.so.conf and run ldconfig (read up on share libraries if you
  do not know what this means)

Step 3: database related stuff
  restart PostgreSQL
  create a new PRepS database, or update an existing one (see sections IV
  and V of this file)

See ./configure --help for a detailed list of all of the arguments that 
configure understands.  

Of note is:
--with-pg-prefix=DIR
  Prefix where PostgreSQL is installed (optional)
  This option sets the prefix that was used when PostgreSQL was installed
  on your system.  The configure script looks in a few common places, but
  if PostgreSQL is installed elsewhere, configure will fail to find it.  Use
  this argument to get around that problem.

Remeber to create at least one database.  If you are upgrading from a 
previous version of PRepS, be sure to update your databases.


IV.  Creating a database (see the next section if you are upgrading PRepS)

You must create a database for PRepS to work with.  Use the create_prepsdb
script (installed in $PREFIX/bin in step #1) to do this.

create_prepsdb takes the following arguments:
  -d : Use default database name and description (good for first Db)
  -v : show version
  -h : show help message
create_prepsdb may ask you for the 'postgres' user password (you need 
that privilege in order to install the PL/pgSQL language), so have that
information handy.  

When create_prepsdb prompts you for the database name, you may choose any
name you want.  Be aware, however, that PRepS looks for 'myprs' (no quotes)
by default.  If you use any other database name, you will need to launch
PRepS with the -d option (see the README file for more information).

The create_prepsdb script MUST be run from the PostgreSQL super user 
account.  The script will prompt for the owner of the database.  The
user ID entered here must be setup as a PostgreSQL user.

For more information on create_prepsdb, see the create_prepsdb man page.


V.  Updating an existing PRepS database

If you are upgrading from an older version of PRepS, you may need to update
the schema version (see the following table).

To update a database, all you should need to do is type:

update_prepsdb database_name

The update_prepsdb script MUST be run from the PostgreSQL superuser account.

See the update_prepsdb man page, or the PRepS documentation (HTML or info)
for details.

Schema versions:
   PRepS Version        Database Schema
   =============        ===============
     v1.2.x                    1
     v1.4.x                    3
     v1.6.x                    4
     v1.8.x                    4

enjoy!


$Id: INSTALL,v 1.3 2003/04/28 00:39:27 stuffle Exp $
