On Mon, 18 Jul 2011 16:10:55 -0400, tim wrote:
Im trying to install tomcat 5 on my iseries. I downloaded and extracted
the zip file into /tomcat5. I modified the catalina.sh file by adding
"JAVA_HOME=/QIBM/ProdData/Java400/jdk15" and "os400=true". From qsh,
when I try to start the server, I get the following:
Tim,
This is what I've done on V5R4M0. Hopefully it helps get you started. I'm
running Tomcat 6.0.26 using the 64 bit Java 6 JVM.
edit catalina.sh and startup.sh:
os400=true
add to catalina.sh:
JAVA_HOME=/QIBM/ProdData/Java400/jdk6; export JAVA_HOME
If you want to use Java 1.5, and that's the default on your system, you
don't need this:
#
# QIBM_JAVA_PROPERTIES_FILE
# Tells the system to use the Java 1.6.0 java engine
QIBM_JAVA_PROPERTIES_FILE=/usr/local/java1.6.properties; export \
QIBM_JAVA_PROPERTIES_FILE
You can also set the JAVA_OPTS variable in catalina.sh to configure
garbage collection. I use this, but you'll need to play with it:
JAVA_OPTS="-verbose:gc -Xms800m -Xmx4000m
Also, int catalina.sh, look for COMMAND='CHGJOB JOB('$jobname') RUNPTY(6)'
I changed that to RUNPTY(18). RUNPTY(6) puts it in competition with the
critical OS stuff. Not so good...
# Create a soft link to the tomcat library to facility changing versions
without having to change anything else.
# I store my web stuff in /usr/local.
cd /usr/local
ln -s /usr/local/apache-tomcat-{version info} tomcat
/* Add the CATALINA_HOME environment variable (execute as QSECOFR) */
ADDENVVAR ENVVAR(CATALINA_HOME)
VALUE('/usr/local/tomcat')
LEVEL(*SYS)
Actually, I use an autostart job entry to start the tomcat server, and a
monitor program to shut it down when the subsystem ends, but this will
work too. It's an earlier version that I used to get started.
Command and processor for startup and shutdown:
CLP STRTOMCAT:
PGM PARM(&USER)
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
ADDENVVAR ENVVAR(QIBM_JAVA_PROPERTIES_FILE) +
VALUE('/usr/local/java1.6.properties')
MONMSG MSGID(CPFA980) EXEC(DO)
CHGENVVAR ENVVAR(QIBM_JAVA_PROPERTIES_FILE) +
VALUE('/usr/local/java1.6.properties')
ENDDO
SBMJOB CMD(QSH +
CMD('/usr/local/tomcat/bin/startup.sh')) +
JOB(TOMCAT) JOBQ(QSYS/QSYSNOMAX) +
USER(&USER)
RMVENVVAR ENVVAR(QIBM_JAVA_PROPERTIES_FILE)
ENDPGM
Command STRTOMCAT:
CMD PROMPT('Start the TomCat server')
PARM KWD(PARM) TYPE(*NAME) LEN(10) DFT(AS400SVT) +
PROMPT('Job User Name')
CLP ENDTOMCAT:
PGM
SBMJOB CMD(QSH +
CMD('/usr/local/tomcat/bin/shutdown.sh')) +
JOB(TOMCAT) JOBQ(QSYSNOMAX)
ENDPGM
Command ENDTOMCAT:
CMD PROMPT('End the TomCat server')
hth
As an Amazon Associate we earn from qualifying purchases.