To the Brass 
Cannon Webboard
Established 1986

Kevin Martin - PO Box 82783 - Portland, OR 97282

Sample script to start Weblogic cluster

#!/bin/sh
# - set env variables and start Weblogic server
#
# Note: The Java 1.2.2 JDK is installed in /opt/java
#       Weblogic 5.1       is installed in /opt/weblogic
#
# See: http://www.weblogic.com/docs51/install/startserver.html
#      http://www.weblogic.com/docs51/cluster/setup.html
#                                                 - KM 7/2000
#-------------------------------------------------------------
JDK_HOME=/opt/java/jre ; export JDK_HOME
WL_HOME=/opt/weblogic ; export WL_HOME
CL_HOME=/oursite ; export CL_HOME
ORACLE_HOME=/oracle/app/oracle/product/8.1.6 ; export ORACLE_HOME
#
SITECLASSPATH=/oursite/classes
export SITECLASSPATH
#
PATH=/opt/java/bin:/opt/bin:$WL_HOME/bin:$ORACLE_HOME/bin:$PATH
export PATH
#
JAVACLASSPATH=$WL_HOME/classes/boot:$ORACLE_HOME/classes
export JAVACLASSPATH
#
WEBLOGICCLASSPATH=$WL_HOME/license:$WL_HOME/classes:$WL_HOME/lib/weblogicaux.jar:$SITECLASSPATH
export WEBLOGICCLASSPATH
#
CLASSPATH=$JAVACLASSPATH:$WEBLOGICCLASSPATH:$SITECLASSPATH
export CLASSPATH
#
LD_LIBRARY_PATH=$WL_HOME/lib/solaris:$WL_HOME/lib/solaris/oci815_8:\
/oracle/app/oracle/product/8.1.6/lib:\
/oracle/app/oracle/product/8.1.6/lib64:/usr/ucblib
export LD_LIBRARY_PATH
#
# Oracle environmental setup
ORAENV_ASK=NO; export ORAENV_ASK
ORACLE_SID=tax; export ORACLE_SID
. oraenv
#
# Note: the double == on the assignment of java.security.policy
# tells java to use ONLY this policy -- a single = would append
# to the existing policy, if any.
#
for i in 1 2 3 4; do
	$JDK_HOME/bin/java -ms64m -mx64m -classpath $JAVACLASSPATH \
	-Dweblogic.system.name=server$i \
	-Dweblogic.cluster.enable=true \
	-Dweblogic.cluster.name=wlcluster \
	-Djava.security.manager \
	-Djava.security.policy==$WL_HOME/weblogic.policy \
	-Dweblogic.class.path=$WEBLOGICCLASSPATH \
	-Dweblogic.system.name=server$i \
	-Dweblogic.system.home=$WL_HOME weblogic.Server > \
	/var/log/weblogic/wlserver$i.log 2>&1 &
done

#
# To run a single unclustered server, the system name must be changed to
# wlcluster/server1 so that we find the server-level weblogic.properties
# file beneath the (otherwise unused) wlcluster directory.
#
# For debugging, we can save the current environment:
#
#env > /var/log/weblogic/env.txt
#
# This is moot in batch mode but necessary if you wish to continue an
# interactive session:
#
#unset LD_LIBRARY_PATH
#
#  End of startWebLogic
#

Please Note

If a search engine dropped you directly into this document, you should go to the index page to find out what you're reading. This document is a record of a project from 1999-2000 -- it is not a current guide to installing any software product.