当需要部署多个tomcat的时,为了避免启动tomcat时出现冲突,
修改tomcat中的某些参数,编辑bin/startup.bat,避免启动路径错误,默认会启动CATALINA_HOME所指向的tomcat
在文件第一行添加如下两行
SET JAVA_HOME=C:websoftjdk1.7.0_51(JDK所在路径)
SET CATALINA_HOME=F:maventomcat7(tomcat解压的路径)
修改conf/server.xml文件,避免启动端口冲突,修改地方有三处
1:<Connector port="8080" redirectPort="8443" protocol="HTTP/1.1" connectionTimeout="20000"/>
<Connector port="8081" redirectPort="8443" protocol="HTTP/1.1" connectionTimeout="20000"/>
2:<Connector port="8009" redirectPort="8443" protocol="AJP/1.3"/>
<Connector port="8010" redirectPort="8443" protocol="AJP/1.3"/>
3:<Server port="8005" shutdown="SHUTDOWN">
<Server port="8006" shutdown="SHUTDOWN">