Installation

O.K. … You’ve now downloaded from CVS the gratia source tree. Where to go from here?

There are a number of assumptions being made when you bring up gratia for the first time:

Building:

Deployment:

Tomcat Configuration:

Modify $CATALINA_HOME/conf/server.xml. Specifically, you must define at least 1 open socket (we use 8880 as a default) and, if running a secure connection, a ssl port (we use 8843 as a default). More information on security can be found in the gratia security howto page.

Server Configuration:

Under linux, at least, you should use something similar to the following for you inet.d configuration:

#!/bin/sh
#
# Penelope: Start tomcat-ps
#

export CATALINA_HOME=/data/tomcat
export JAVA_HOME=/data/vdt/jdk1.5
export JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dssl.port=8443"

if [ "$1" = "start" ] ; then
 $CATALINA_HOME/bin/catalina.sh start
elif [ "$1" = "stop" ] ; then
 $CATALINA_HOME/bin/shutdown.sh
else
 echo "Usage: tomcat-ps [start | stop]" 
 exit 1
fi

Also, under linux, you should modify the shutdown.sh script to the following (note the addition of the unset command):

#!/bin/sh
# -----------------------------------------------------------------------------
# Stop script for the CATALINA Server
#
# $Id: installation-howto.html 4657 2012-04-23 18:24:54Z tlevshina $
# -----------------------------------------------------------------------------

unset $JAVA_OPTS

# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ] ; do
 ls=`ls -ld "$PRG"`
 link=`expr "$ls" : '.*-> \(.*\)$'` 
 if expr "$link" : '.*/.*' > /dev/null; then 
  PRG="$link" 
 else

PRG=`dirname "$PRG"`/"$link" fi done PRGDIR=`dirname "$PRG"` EXECUTABLE=catalina.sh # Check that target executable exists if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then echo "Cannot find $PRGDIR/$EXECUTABLE" echo "This file is needed to run this program" exit 1 fi exec "$PRGDIR"/"$EXECUTABLE" stop "$@"

Running Multiple Gratias:

If you want to run multiple instances of gratia on the same server (meaning multiple copies of tomcat) there are several other items to be taken care of: