Running the DGEE
----------------

There are three prerequisites that must be satisfied in order to run the DGEE:

1. That the necessary environment variables are set before running DGEE or its
   tools
2. That sufficient IPC resources are made available
3. That the DGEE runs as the same user as Apache (default is nobody)


These are treated in order below.  Please refer to the other included 
documentation for further information.

The README document explains how to start the DGEE!
The QUICKSTART explains how to configure and install webservices into the DGEE.


1. Setting the Environment
--------------------------
In order to start/stop and control the DGEE several environment variables must
be set.

GWCONFIG        - Points to the compiled XML configuration
PATH            - Includes the path to DGEE tools
LD_LIBRARY_PATH - May include the path to DGEE libraries
DGEE_REPOSITORY - Used by dgeeinstallws to find where to install web services

These environment variables are set up automatically by the dgeeenv.sh script,
installed by default in /usr/local/share/dgee/dgeeenv.sh

This script should be . sourced to import the dgee environment variables.

. /usr/local/share/dgee/dgeeenv.sh

(/usr/local/share/dgee is the default installation location).

You could edit the ~/.profile (or .bash_profile) and . source the dgeeenv.sh
there, however by default the DGEE runs as the nobody user, and the nobody user
does not have a HOME directory or profile....

The dgee tools dgeestart, dgeestop, dgeeinstallws and dgadmin may be run as
root as they will switch to the 'nobody' user as appropraite.  dgeeenv.sh
could be sourced in roots .profile if you intend running the DGEE tools as
root, but it is probably best to source it on the command line prior to running
and DGEE tools, or even source it in the profile of a regular user and su to 
root in order to run the tools.

The choice is yours.


2. Tuning System Resources
--------------------------
Run the command dgeediagnose.  This will check and report on may configuration
issues that may affect the running of the DGEE.

The DGEE requires a number of SysV IPC message queues.  By default most kernels
come configured with very few system wide queues (ipcs -l will show what is
configured on your system).

Under linux this may be increased in two ways:
1. echo 128 > /proc/sys/kernel/msgmni  (as root)
2. edit /etc/sysctl.conf and add :

# Increase Max Message Queues to 128
kernel.msgmni = 128

(changes take effect on next reboot).


3. Setting the user that runs the DGEE if 'nobody' is not what you want
-----------------------------------------------------------------------
By default the binary release of the DGEE expects to run as the nobody user.
This MUST be the same as the Apache user as they both need to share resources.
If the nobody user does not suit your local set up, or you cannot change Apache,
then you may change the DGEE as follows:

Change your configuration:

shell> export GWCONFIG=/usr/local/etc/dgeeconf.bin
shell> vi /usr/local/etc/dgeeconf.xml

and change user="nobody" and group="nobody" to the appropriate user and group.

Now compile it:
shell> gwmkcfg /usr/local/etc/dgeeconf.xml

Now set some ownerships:
shell> chown user:group /usr/local/var/dgee/data
shell> chown user:group /usr/local/var/dgee/index
shell> chown user:group /usr/local/var/log/dgee
shell> chown user:group /usr/local/var/spool/dgee

where user and group refer to your desired user and group (the same as apache).


------------------------------------------------------------------------------
See the INSTALL and QUICKSTART and README documents for further information.

