The RLS server setup package depends on the location where the database
software is installed.  By default these are assumed to
be installed in $GLOBUS_LOCATION, if they're installed in some other location
you will need to set one or more of the following environment variable before
installing the RLS server setup package.  The environment variables, with
their defaults in square brackets, are:

  GLOBUS_IODBC_PATH [$GLOBUS_LOCATION]    # toplevel dir where iodbc installed
  ODBCINI [$GLOBUS_LOCATION/var/odbc.ini] # path to odbc.ini file

You only need the following variable if you're using MySQL (RLS is now
developed using PostgreSQL):

  GLOBUS_MYSQL_PATH [$GLOBUS_LOCATION]    # toplevel dir where mysql installed

You may use gpt version 1 or 2 to build and install the RLS server.
The command if using gpt2 is:

  gpt-build globus_rls_server_setup-1.1.tar.gz

or if you've already unpacked the tar file:

  gpt-build -srcdir=.

With gpt1:

  globus-build -srcdir=.

Or you may configure, build and install by hand:

  ./configure
  make
  make install

Once you've installed the RLS server setup package you should run

  $GPT_LOCATION/sbin/gpt-postinstall

CONFIGURATION

  The default configuration file is installed in
  $GLOBUS_LOCATION/etc/globus-rls-server.conf, you should examine this
  file and make changes as appropriate for your installation.  Note this
  file has the username and password that the server will use to connect
  to the database, so it should not be world readable unless all users
  on the local machine should have access to the database.

DATABASE INITIALIZATION

  Two scripts are provided to create LRC and RLI databases, called
  globus-rls-lrc-<rdbms>.sql and globus-rls-rli-<rdbms>.sql.  <rdbms>
  depends on the database software you're using, currently Postgres and MySQL
  are supported.  Scripts for Oracle are also provided, however RLS has only
  been tested minimally with Oracle.

  These instructions presume that you've already built and installed
  iODBC, PostgreSQL and psqlODBC .  If you're creating an LRC database please
  use the following command to create it:

   createdb lrc1000
   psql -d lrc1000 -f $GLOBUS_LOCATION/setup/globus/globus-rls-lrc-postgres.sql

  If you're configuring an RLI server, use this command to create a database
  called rli1000:

   createdb rli1000
   psql -d rli1000 -f $GLOBUS_LOCATION/setup/globus/globus-rls-rli-postgres.sql

STARTING THE SERVER

  The server may be started with the command "SXXrls start", which is
  installed in $GLOBUS_LOCATION/sbin/SXXrls.  The server will detach
  from the controlling terminal and log to syslog.

  If you wish to run the server manually for debugging purposes, you
  will need to make sure your LD_LIBRARY_PATH environment variable
  includes $GLOBUS_LOCATION/lib, and $GLOBUS_LOCATION/lib/mysql if you're
  using MySQL.  Typically when running the server manually you'll want to
  use the -d option to prevent it from detaching from the controlling terminal
  (also causes the server to write log messages to stdout rather than syslog).
  Other useful options when debugging include "-c configfile" to specify
  an alternate configuration, and "-L loglevel" to increase logging verbosity.
  For example:

    # only need to do this if not already set
    setenv LD_LIBRARY_PATH $GLOBUS_LOCATION/lib$LD_LIBARY_PATH

    $GLOBUS_LOCATION/bin/globus-rls-server -d -L 2

  or

    $GLOBUS_LOCATION/bin/globus-rls-server -d -L 2 -c /tmp/myconfigfile

  If you've configured the server as an LRC server you will probably want
  to configure the list of RLI servers that it sends updates to.  This
  used to be done in the conifguration file, but is now done using the
  tool globus-rls-admin(8), since the RLI update list is now in the LRC
  database.  Note the RLI update list can include patterns that restrict
  which logical filenames are sent to a RLI server.

MDS

  The RLS client package includes a program globus-rls-reporter
  that is installed in $GLOBUS_LOCATION/libexec that can be used
  to extract info from an RLS server and report it to MDS.

  To enable MDS reporting of RLS statistics please append the file
  rls-ldif.conf to $GLOBUS_LOCATION/etc/grid-info-resource-ldif.conf.
  You will need to set your VO name in rls-ldif.conf first if it is not
  "local".  Note it needs to be set twice, in the "dn:" and "args:" lines.
  You may also wish to set the URL of the RLS server you're monitoring
  if it's not running on the same host as MDS, or it's not using the
  default port.  You can also set the certificate and key files to
  use for authentication with the -c and -k args.  Please see the
  globus-rls-reporter(1) man page for details.
