1.jvm参数设置
bin目录下catalina.sh
# ----- Execute The Requested Command -----------------------------------------#
JAVA_OPTS="-server -Xms256m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=128m"
2.连接数线程配置
conf目录下server.xml
<Connector
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
acceptCount="2000"
maxThreads="1200"
URIEncoding="UTF-8"
redirectPort="8443" />
3. 虚拟路径挂载
<Engine defaultHost="localhost" name="Catalina">
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Context docBase="server1" path="/server1" reloadable="true" source="/data/server1"/>
</Host>
</Engine>
4.web管理配置
conf目录下tomcat-users.xml
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user roles="admin,manager,manager-gui,manager-script" password="admin" username="admin"/>