我有一个正在运行的Tomcat,想要开始一秒钟。以下脚本是否有效?
export CATALINA_HOME="/opt/logicalDoc/tomcat"
export CATALINA_PID="/opt/logicalDoc/bin/pid"
export JAVA_OPTS="-Xmx2133m -XX:MaxPermSize=128m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"
#-Djava.security.egd=file:/dev/./urandom
case $1 in
start) if [ -e $CATALINA_PID ]
then
kill -9 `tail $CATALINA_PID`
rm -rf $CATALINA_PID
fi
"$CATALINA_HOME/bin/catalina.sh" start
;;
当我运行脚本时,我得到:
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/logicalDoc/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_92/jre
Using CLASSPATH: /opt/logicalDoc/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/logicalDoc/bin/pid
Tomcat started.
当我运行ps -aux |时grep -i tomcat,我没有看到第二个Tomcat实例。
为什么第二个Tomcat实例无法启动?我该如何解决这个问题?