Apache Tomcat 7.0.0 简单配置
This is the top-level entry point of the documentation bundle for the Apache Tomcat Servlet/JSP container. Apache Tomcat version 7.0 implements the Servlet 3.0 and JavaServer Pages 2.2 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.
Select one of the links from the navigation menu (to the left) to drill down to the more detailed documentation that is available. Each available manual is described in more detail below.
apache-tomcat-7.0.0/bin/catalina.bat
打开此文件,在大概87行后面回车,添加如下设置:
set JAVA_OPTS=-server -Dcom.sun.management.jmxremote -Xms512m -Xmx1024m -XX:PermSize=400m -XX:MaxPermSize=400m
上面的设置就不用多说了,大伙都很清楚了。
*****************************************************************
apache-tomcat-7.0.0/bin/tomcat-users.xml
打开此文件,取消注释,修改如下设置:
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager-gui"/>
</tomcat-users>
给 Tomcat 的管理帐户,设置的用户名与验证码。
*****************************************************************
apache-tomcat-7.0.0/bin/server.xml
打开此文件,在大概67行处,修改 Tomcat 运行所要占用的端口号:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" disableUploadTimeout="true"/>
Tomcat 运行时所要使用的端口号。
*****************************************************************
在 Linux 系统下只需修改如下一个文件即可,修改如下:
catalina.bat
JAVA_HOME=/usr/java/jdk1.6.0_18/
JAVA_OPTS="-server -Xms1800m -Xmx1800m -XX:PermSize=400m -XX:MaxPermSize=400m -Dcom.sun.management.jmxremote"
做个简单备忘笔记,以后配置 Web 服务时就方便了。