参考:https://blog.csdn.net/wdy_2099/article/details/72627917
1.首先,下载 2个 tomcat ,一个默认名字就行,另一个改成tomcat2
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.0.52/bin/apache-tomcat-8.0.52.tar.gz
tomcat.jpg
2.修改 profile 文件
sudo vi /etc/profile
修改完成,更新下。
source /etc/profile
tomcat2.jpg
3.切换到tomcat2/conf目录,在server.xml中修改以下字段的端口号
sudo vi server.xml
<Server port="8010" shutdown="SHUTDOWN">
<Connector port="8088" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8099" protocol="AJP/1.3" redirectPort="8443" />
4.切换到tomcat2/bin 在 startup.sh和shutdown.sh 添加以下字段。
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
# -----------------------------------------------------------------------------
export JAVA_HOME=/software/jdk1.8.0_171
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
export CATALINA_HOME=$CATALINA_2_HOME
export CATALINA_BASE=$CATALINA_2_BASE
# Better OS/400 detection: see Bugzilla 31132
4.测试。
同时打开2个tomcat服务
sudo ./startup.sh
tomcat3.jpg
网友评论