直接放入tomcat_home\bin下
文件名:setenv.sh
---------------------------------------------------
--------------------------------------------------------------
文件名:setenv.sh
---------------------------------------------------
#!/bin/sh
export JAVA_HOME=/home/wangzhirui/jdk1.7.0
export JRE_HOME=$JAVA_HOME/jre
export classpath=.:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar
export LD_LIBRARY_PATH=$JAVA_HOME/native/lib:$LD_LIBRARY_PATH
export JAVA_OPTS=" \
-server \
-Xms512M \
-Xmx512M \
-Xss512k \
-XX:PermSize=64M \
-XX:MaxPermSize=300M \
-XX:+AggressiveOpts \
-XX:+UseBiasedLocking \
-XX:+DisableExplicitGC \
-XX:MaxTenuringThreshold=31 \
-XX:+UseConcMarkSweepGC \
-XX:+UseParNewGC \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCMSCompactAtFullCollection \
-XX:LargePageSizeInBytes=128m \
-XX:+UseFastAccessorMethods \
-XX:+UseCMSInitiatingOccupancyOnly \
-Djava.awt.headless=true"
--------------------------------------------------------------