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, though
that is somewhat of a misnomer.  The libPRepS package contains the scripts
used to setup the database on the server end.  It also contains the libpreps
library, which contains common functions used on both the client and the
server end.  For this reason, libPRepS will need to be installed on the
server machine, as well as any client machines.

If your whole network consists of one machine, ignore all this "client" and
"server" talk.  You will just need to do the default "server" type install.


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://www.execpc.com/~stuffle/linux/preps/preps.html


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)

Note that if this is a "client only" build (IOW, the database server is
on a different machine, and libPRepS is only being built for use by a
PRepS user interface), step 3 can be skipped.


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

Of note is:
--disable-server-scripts 
  Do not install the server side scripts (the scripts used in database 
  creation).  This saves a little bit (very little) of disk space on 
  client machines.  It may be desirable that all PRepS database are only
  created from the server.  If that is the case, use this option when
  building libPRepS on machines other than the server.
--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.


Note that at this time, configure assumes that the libs and programs
installed with PostgreSQL are all under the same directory prefix.


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

enjoy!


$Id: INSTALL,v 1.2 2001/01/07 20:57:07 stuffle Exp $
