Last active
May 22, 2016 10:20
-
-
Save yangl/791991a463c2e063e4f5 to your computer and use it in GitHub Desktop.
tomcat配置相关 ./catalina.sh stop 0 -force是先通过调用Tomcat的shutdown端口关闭,然后再kill进程。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..7};do | |
cd server$i | |
./stop.sh && ./start.sh | |
cd ../ | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CATALINA_BASE=/data/soft/tomcat_metrics-mq/server1 | |
CATALINA_HOME=/data/soft/tomcat_home | |
CATALINA_PID=$CATALINA_BASE/tomcat.pid | |
JAVA_OPTS="-server -Xms4g -Xmx4g -Xmn2g -XX:PermSize=128m -XX:MaxPermSize=320m -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-DisableExplicitGC -verbose:gc -Xloggc:./logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./logs -XX:ErrorFile=./logs/java_err_%p.log" | |
export CATALINA_BASE CATALINA_HOME CATALINA_PID JAVA_OPTS | |
sh $CATALINA_HOME/bin/catalina.sh start | |
exit $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CATALINA_BASE=/data/soft/tomcat_metrics-mq/server1 | |
CATALINA_HOME=/data/soft/tomcat_home | |
CATALINA_PID=$CATALINA_BASE/tomcat.pid | |
export CATALINA_BASE CATALINA_HOME CATALINA_PID | |
sh $CATALINA_HOME/bin/catalina.sh stop 0 -force | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment