First Commit - Source Code from Reply
This commit is contained in:
123
dbcmnpsrc/FE/domain/startMnpserver1.sh
Normal file
123
dbcmnpsrc/FE/domain/startMnpserver1.sh
Normal file
@@ -0,0 +1,123 @@
|
||||
#!/bin/sh
|
||||
# ****************************************************************************
|
||||
# This script is used to start a managed WebLogic Server for the domain in the
|
||||
# current working directory. This script reads in the SERVER_NAME and
|
||||
# ADMIN_URL as positional parameters, sets the SERVER_NAME variable, then
|
||||
# starts the server.
|
||||
#
|
||||
# Other variables that startWLS takes are:
|
||||
#
|
||||
# WLS_USER - cleartext user for server startup
|
||||
# WLS_PW - cleartext password for server startup
|
||||
# PRODUCTION_MODE - Set to true for production mode servers, false for
|
||||
# development mode
|
||||
# JAVA_OPTIONS - Java command-line options for running the server. (These
|
||||
# will be tagged on to the end of the JAVA_VM and MEM_ARGS)
|
||||
# JAVA_VM - The java arg specifying the VM to run. (i.e. -server,
|
||||
# -hotspot, etc.)
|
||||
# MEM_ARGS - The variable to override the standard memory arguments
|
||||
# passed to java
|
||||
#
|
||||
# For additional information, refer to the WebLogic Server Administration Guide
|
||||
# (/ConsoleHelp/startstop.html).
|
||||
# ****************************************************************************
|
||||
|
||||
|
||||
# set up WL_HOME, the root directory of your WebLogic installation
|
||||
WL_HOME="/bea/bea81sp3/weblogic81"
|
||||
|
||||
# set up common environment
|
||||
# Set Production Mode. When this is set to true, the server starts up in
|
||||
# production mode. When set to false, the server starts up in development
|
||||
# mode. If it is not set, it will default to false.
|
||||
PRODUCTION_MODE="true"
|
||||
|
||||
# Set JAVA_VENDOR to java virtual machine you want to run on server side.
|
||||
JAVA_VENDOR="IBM"
|
||||
|
||||
# Set JAVA_HOME to java virtual machine you want to run on server side.
|
||||
JAVA_HOME="/usr/java14"
|
||||
|
||||
. "${WL_HOME}/common/bin/commEnv.sh"
|
||||
|
||||
# Set SERVER_NAME to the name of the server you wish to start up.
|
||||
ADMIN_URL="http://dbcesefe1.rm.tim.it:7001"
|
||||
SERVER_NAME="mnpserver1"
|
||||
# Set server_url for MasterIdentificator
|
||||
SERVER_URL="t3://dbcesefe1.rm.tim.it:7501"
|
||||
|
||||
# Set JAVA_VM to java virtual machine you want to run on server side.
|
||||
# JAVA_VM="-server"
|
||||
|
||||
# Set JAVA_OPTIONS to the java flags you want to pass to the vm. If there
|
||||
# are more than one, include quotes around them. For instance:
|
||||
# JAVA_OPTIONS="-Dweblogic.attribute=value -Djava.attribute=value"
|
||||
|
||||
# Start WebLogic server
|
||||
# Reset number of open file descriptors in the current process
|
||||
# This function is defined in commEnv.sh
|
||||
resetFd
|
||||
|
||||
|
||||
#mnp settings begin
|
||||
|
||||
THIS_PATH=`dirname $0`
|
||||
. /mnpapp/script/setEnv.sh
|
||||
MEM_ARGS="-Xms1024m -Xmx2048m"
|
||||
|
||||
# includo patch bea x code JMS prima di weblogic.jar
|
||||
CLASSPATH="${IBR4_PATCH_CLASSPATH}${IB_CLASSPATH}${AXIS_CLASSPATH}${PATCH_CLASSPATH}${JNI_BRIDGE_CLASSPATH}${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${JAVA_HOME}/jre/lib/rt.jar${CLASSPATHSEP}${WL_HOME}/server/lib/webservices.jar${CLASSPATHSEP}${CLASSPATH}"
|
||||
|
||||
export CLASSPATH
|
||||
|
||||
#log file
|
||||
NOW=$(date '+%Y%m%d%H%M%S')
|
||||
mv ${MNP_LOG_MNPSERVER1_FILE} ${MNP_LOG_MNPSERVER1_FILE}.$NOW
|
||||
|
||||
#getting crontab option and admin url
|
||||
CRONTAB_ACTIVE=Y
|
||||
while getopts a:c: OPT
|
||||
do
|
||||
case $OPT in
|
||||
a) ADMIN_URL="$OPTARG";;
|
||||
c) CRONTAB_ACTIVE="$OPTARG";;
|
||||
?) echo "Usage: startMnpserver1.sh [-a admin-url][-c crontabActive]"
|
||||
echo "Example: startMnpserver1.sh -a http://localhost:7001"
|
||||
exit ;;
|
||||
esac
|
||||
done
|
||||
echo "crontab --> $CRONTAB_ACTIVE"
|
||||
echo "admin url --> $ADMIN_URL"
|
||||
|
||||
MNP_FOREVER_SLAVE=false
|
||||
echo "MNP_FOREVER_SLAVE --> $MNP_FOREVER_SLAVE"
|
||||
#mnp settings end
|
||||
|
||||
# Start WebLogic server
|
||||
echo CLASSPATH="${CLASSPATH}"
|
||||
echo
|
||||
echo PATH="${PATH}"
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "* To start WebLogic Server, use a username and *"
|
||||
echo "* password assigned to an admin-level user. For *"
|
||||
echo "* server administration, use the WebLogic Server *"
|
||||
echo "* console at http://<hostname>:<port>/console *"
|
||||
echo "***************************************************"
|
||||
|
||||
nohup "$JAVA_HOME/bin/java" ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} \
|
||||
-verbosegc \
|
||||
-Dfile.encoding=ASCII \
|
||||
-Dweblogic.Name=${SERVER_NAME} \
|
||||
-Dweblogic.management.server=${ADMIN_URL} \
|
||||
-Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" \
|
||||
-Dweblogic.system.BootIdentityFile="${THIS_PATH}/BootIdentity.properties" \
|
||||
-Dmnp_path_properties="${MNP_PROP_FILE}" \
|
||||
-Dcrontab_path_properties="${CRONTAB_PROP_FILE}" \
|
||||
-Dcrontab_active="${CRONTAB_ACTIVE}" \
|
||||
-Ddbcgo_conf_file="${DBCGO_CONF_FILE}" \
|
||||
-Dsecurity_conf_file="${MNP_SECURITY_PROP_FILE}" \
|
||||
-Dmnp_forever_slave="${MNP_FOREVER_SLAVE}" \
|
||||
-Dserver_url="${SERVER_URL}" \
|
||||
-Dproc_exec_path_properties="${PROCESS_EXEC_PROP_FILE}" \
|
||||
weblogic.Server >> ${MNP_LOG_MNPSERVER1_FILE} 2>&1 &
|
||||
Reference in New Issue
Block a user