tomcat版本:9.0.44
首先复制粘贴一份tomcat文件夹,找到conf\server.xml
文件
修改
<Server port="8005" shutdown="SHUTDOWN">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
为
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="8001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
接着用编辑器打开bin\start.bat
在首行加上
set TITLE="Tomcat2"
set CATALINA_BASE="D:\Program_Files\Environment\apache-tomcat2"
set CATALINA_HOME="D:\Program_Files\Environment\apache-tomcat2"
需将新的Tomcat路径放入其中
此时便可以运行两个Tomcat了