标签:变量 color export log cti 连接 tomcat error github
连接池: <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="500" minSpareThreads="30" prestartminSpareThreads = "true" maxQueueSize = "100" maxIdleTime="60000"/> 连接: <Connector executor="tomcatThreadPool" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" acceptCount="100" acceptorThreadCount="2" redirectPort="8443" URIEncoding="utf-8"/> 禁用 AJP(如果你服务器没有使用 Apache,我们用的Nginx) <!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> --> 如果是部署多Tomcat,Connector端口和Server端口要改下,防止端口出现冲突, 各参数详细解释可以参照官网,或者底部的链接
cd bin
vim catalina.sh
首行添加如下:
CATALINA_OPTS=‘-server -Xms1024m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+UseParallelOldGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/data/log/posapp/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/log/posapp/heapdump.bin‘ export JAVA_HOME=/usr/local/jdk1.7.0_79 export JRE_HOME=/usr/local/jdk1.7.0_79/jre
JAVA_OPTS和CATALINA_OPTS稍有不同,最好设置CATALINA_OPTS,关于2者的不同 参见:
https://stackoverflow.com/questions/11222365/catalina-opts-vs-java-opts-what-is-the-difference
cd /etc
vim profile
#set java environment JAVA_HOME=/usr/local/jdk1.7.0_79 JRE_HOME=/usr/local/jdk1.7.0_79/jre CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME JRE_HOME CLASSPATH PATH
aemonize yes
requirepass *****
标签:变量 color export log cti 连接 tomcat error github
原文地址:http://www.cnblogs.com/Non-Tecnology/p/7467005.html