当tomcat注册为windows服务时候,怎样配置tomcat的内存
一般用tomcat做服务器的时候,总是会有内存不够的情况,如果以startup.bat启动的tomcat设置内存将会很简单,当以服务启动的时候设置的办法为:
1; Go to run box and run regedit;
2; HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Procrun 2.0/Tomcat7/Parameters/Java
3;Add the Items: JvmMs and JvmMx and put the memory size you want.
查看内存使用状态:
1,修改TOMCAT_HOME/conf/tomcat-users.xml
<role rolename="tomcat"/> <role rolename="role1"/> <role rolename="manager-gui"/> <role rolename="manager-status"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <user username="tomcat" password="tomcat" roles="manager-gui"/> <user username="tomcat" password="tomcat" roles="manager-gui"/>