在Linux上部署多个tomcat主要是防止端口冲突的问题,

tomcat服务器需配置三个端口才能启动,安装时默认启用了这三个端口,当要运行多个tomcat服务时需要修改这三个端口,不能相同。
端口一:(记得去实例上开放所改端口号的安全组)
修改http访问端口(默认为8080端口),配置文件为tomcat\ conf\service.xml

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> 
<!-- A "Connector" using the shared thread pool--> 
<!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

端口二:
修改Shutdown远程停服务端口(默认为8005端口)

<Server port="8005" shutdown="SHUTDOWN">

端口三:
修改AJP端口(默认为8009端口)

<!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Logo

更多推荐