标签:
下载 Tomcat 安装包,解压到一个目录,比如 /opt/tomcat/ 目录下,配置三个 Tomcat 为 tomcat-7070,tomcat-8080,tomcat-9090。约定 %TOMCAT_HOME% 代表这写目录
配置 %TOMCAT_HOME%/conf/server.xml ,启动和关闭端口
修改 tomcat-7070 的server.xml
<!-- 关闭端口 --> <Server port="7171" shutdown="SHUTDOWN"> <!-- 启动端口 --> <Connector port="7070" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
修改 tomcat-8080 的server.xml
<!-- 关闭端口 --> <Server port="8181" shutdown="SHUTDOWN"> <!-- 启动端口 --> <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
修改 tomcat-9090 的server.xml
<!-- 关闭端口 --> <Server port="9191" shutdown="SHUTDOWN"> <!-- 启动端口 --> <Connector port="9090" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
启动 tomcat-7070、tomcat-8080、tomcat-9090,启动脚本 sh %TOMCAT_HOME%/bin/startup.sh
浏览器访问 http://localhost:7070/ , http://localhost:8080/ , http://localhost:9090/
标签:
原文地址:http://www.cnblogs.com/cmdra/p/5908830.html