tomcat服務器需配置三個端口才能啓動,安裝時默認啓用了這三個端口,當要運行多個tomcat服務時須要修改這三個端口,不能相同。web
端口一: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" />app
端口二:webapp
修改Shutdown端口(默認爲8005端口) <Server port="8005" shutdown="SHUTDOWN">學習
端口三:spa
修改JVM啓動端口(默認爲8009端口) <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />3d
(1) 打開I:\work\tomcat9_8090\bin\startup.bat文件,把其中全部CATALINA_HOME替換爲CATALINA_HOME2。server
(2)打開I:\work\tomcat9_8090\bin\catalina.bat文件,把其中全部CATALINA_HOME替換爲CATALINA_HOME2。xml
1.編譯項目存放(編譯的文件放在tomcat下面的webapps,tomcat在啓動時會自動解壓)
2.啓動運行
大功告成,收工!!!
有互相交流學習的請加qq997170243,共同進步