配置多个tomcat
在/etc目录下的profile文件配置
#set java environment
export JAVA_HOME=/usr/local/jvm/jdk1.7.0_80
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
#tomcat-pay
CATALINA_BASE=/usr/local/tomcat/tomcat-pay
CATALINA_HOME=/usr/local/tomcat/tomcat-pay
TOMCAT_HOME=/usr/local/tomcat/tomcat-pay
export CATALINA_BASE CATALINA_HOME TOMCAT_HOME
#tomcat-ivr
CATALINA_2_BASE=/usr/local/tomcat/tomcat-ivr
CATALINA_2_HOME=/usr/local/tomcat/tomcat-ivr
TOMCAT_2_HOME=/usr/local/tomcat/tomcat-ivr
export CATALINA_2_BASE CATALINA_2_HOME TOMCAT_2_HOME
#tomcat-ivr
CATALINA_3_BASE=/usr/local/tomcat/tomcat-management
CATALINA_3_HOME=/usr/local/tomcat/tomcat-management
TOMCAT_3_HOME=/usr/local/tomcat/tomcat-management
export CATALINA_3_BASE CATALINA_3_HOME TOMCAT_3_HOME
Tomcat下
在bin目录下的startup.sh/shutdown.sh配置
export JAVA_HOME=/usr/local/jvm/jdk1.7.0_80
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CATALINA_HOME=$CATALINA_HOME
export CATALINA_BASE=$CATALINA_BASE
export JAVA_HOME=/usr/local/jvm/jdk1.7.0_80
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export TOMCAT_2_HOME=$TOMCAT_2_HOME
export CATALINA_2_BASE=$CATALINA_2_BASE
export JAVA_HOME=/usr/local/jvm/jdk1.7.0_80
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export TOMCAT_3_HOME=$TOMCAT_3_HOME
export CATALINA_3_BASE=$CATALINA_3_BASE
在bin目录下的catalina.sh配置
在文件开头加入
export CATALINA_BASE=$CATALINA_2_BASE
export CATALINA_HOME=$CATALINA_2_HOME
——————————————————————————————————
export CATALINA_BASE=$CATALINA_3_BASE
export CATALINA_HOME=$TOMCAT_3_HOME
网友评论