SSH 修改tomcat中java内存

修改tomcat下bin目录中的catalina.sh文件


修改配置项 JAVA_OPTS="-XX:PermSize=512M -XXMaxPermSize=1024m"


重启tomcat


若无效:

[root@AY14070314494954704eZ tomcat6]# find /etc |xargs grep "JAVA_OPTS"   
/etc/tomcat6/tomcat6.conf:#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"   
/etc/tomcat6/tomcat6.conf:# Use JAVA_OPTS to set java.library.path for libtcnative.so  
/etc/tomcat6/tomcat6.conf:#JAVA_OPTS="-Djava.library.path=/usr/lib"   
/etc/tomcat6/tomcat6.conf:JAVA_OPTS="${JAVA_OPTS} -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"

在/etc/tomcat6/tomcat6.conf文件中加入 JAVA_OPTS="-XX:PermSize=512M -XXMaxPermSize=1024m"

你可能感兴趣的:(ssh,tomcat,SSH)