-
/data/wwwroot
把war包解压到当前目录(unzip解压),解压的名字一定要注意,一般为标准名字 -
/data/program/tomcat-8.0.11/bin里面
打开一个.sh,例如browser_api.sh,cat browser_api.sh
export CATALINA_OUT=/data/logs/tomcat-8.0.11/browser_api.out
export LOGGING_CONFIG="-Djava.util.logging.config.file=../conf/browser_api.properties"
export SERVER_CONF="-config conf/browser_api_8087.xml"
#export JAVA_HOME=/data/program/jdk-1.8.0_45
#export JRE_HOME=$JAVA_HOME/jre
#export CLASSPATH=./:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
#export CATALINA_HOME=/data/program/tomcat-8.0.11
#JAVA_OPTS='-server -Xrs -Xmx512m -Xms512m -Xmn128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:SurvivorRatio=8 -Xverify:none -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8'
JAVA_OPTS='-server -Xrs -Xmx2g -Xms2g -Xmn512m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/tmp/gc.txt -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/logs/ -XX:PermSize=256m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSScavengeBeforeRemark -XX:+UseLargePages -XX:MaxDirectMemorySize=256m -XX:SurvivorRatio=8 -Xverify:none -Dlog4j.log.port=8001 -Djava.rmi.server.hostname=10.206.48.150 -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -javaagent:/data/program/tomcat-8.0.11/tingyun/tingyun-agent-java.jar'
注意这一条:SERVER_CONF="-config conf/browser_api_8087.xml"
找到conf/browser_api_8087.xml,把这个东西复制一下,里面有shutdown的端口9010和运行的端口8087。
然后运行起tomcat就可以了。
网友评论