Ubuntu中,配置多个tomcat

1.修改profile:vi /etc/profile

########eureka的tomcat########
CATALINA_BASE=/usr/tomcat/tomcat-eureka
CATALINA_HOME=/usr/tomcat/tomcat-eureka
export CATALINA_BASE CATALINA_HOME
########eureka的tomcat########

########config的tomcat########
CATALINA_2_BASE=/usr/tomcat/tomcat-config
CATALINA_2_HOME=/usr/tomcat/tomcat-config
export CATALINA_2_BASE CATALINA_2_HOME
########config的tomcat########

########gateway的tomcat########
CATALINA_3_BASE=/usr/tomcat/tomcat-gateway
CATALINA_3_HOME=/usr/tomcat/tomcat-gateway
export CATALINA_3_BASE CATALINA_3_HOME
########gateway的tomcat########

########core的tomcat########
CATALINA_4_BASE=/usr/tomcat/tomcat-core
CATALINA_4_HOME=/usr/tomcat/tomcat-core
export CATALINA_4_BASE CATALINA_4_HOME
########core的tomcat########

########system的tomcat########
CATALINA_5_BASE=/usr/tomcat/tomcat-system
CATALINA_5_HOME=/usr/tomcat/tomcat-system
export CATALINA_5_BASE CATALINA_5_HOME
########system的tomcat########

########customer的tomcat########
CATALINA_6_BASE=/usr/tomcat/tomcat-customer
CATALINA_6_HOME=/usr/tomcat/tomcat-customer
export CATALINA_6_BASE CATALINA_6_HOME
########customer的tomcat########

########human的tomcat########
CATALINA_7_BASE=/usr/tomcat/tomcat-human
CATALINA_7_HOME=/usr/tomcat/tomcat-human
export CATALINA_7_BASE CATALINA_7_HOME
########human的tomcat########

########member的tomcat########
CATALINA_8_BASE=/usr/tomcat/tomcat-member
CATALINA_8_HOME=/usr/tomcat/tomcat-member
export CATALINA_8_BASE CATALINA_8_HOME
########member的tomcat########

########office的tomcat########
CATALINA_9_BASE=/usr/tomcat/tomcat-office
CATALINA_9_HOME=/usr/tomcat/tomcat-office
export CATALINA_9_BASE CATALINA_9_HOME
########office的tomcat########

########personal的tomcat########
CATALINA_10_BASE=/usr/tomcat/tomcat-personal
CATALINA_10_HOME=/usr/tomcat/tomcat-personal
export CATALINA_10_BASE CATALINA_10_HOME
########personal的tomcat########


########eureka的tomcat########
TOMCAT_HOME=/usr/tomcat/tomcat-eureka
export TOMCAT_HOME

########config的tomcat########
TOMCAT_2_HOME=/usr/tomcat/tomcat-config
export TOMCAT_2_HOME

########gateway的tomcat########
TOMCAT_3_HOME=/usr/tomcat/tomcat-gateway
export TOMCAT_3_HOME

########core的tomcat########
TOMCAT_4_HOME=/usr/tomcat/tomcat-core
export TOMCAT_4_HOME

########system的tomcat########
TOMCAT_5_HOME=/usr/tomcat/tomcat-system
export TOMCAT_5_HOME

########customer的tomcat########
TOMCAT_6_HOME=/usr/tomcat/tomcat-customer
export TOMCAT_6_HOME

########human的tomcat########
TOMCAT_7_HOME=/usr/tomcat/tomcat-human
export TOMCAT_7_HOME

########member的tomcat########
TOMCAT_8_HOME=/usr/tomcat/tomcat-member
export TOMCAT_8_HOME

########office的tomcat########
TOMCAT_9_HOME=/usr/tomcat/tomcat-office
export TOMCAT_9_HOME

########personal的tomcat########
TOMCAT_10_HOME=/usr/tomcat/tomcat-personal
export TOMCAT_10_HOME

然后刷新配置:source /etc/profile

2.修改每个tomcat的bin里面的catalina.sh

export CATALINA_BASE=$CATALINA_2_BASE
export CATALINA_HOME=$CATALINA_2_HOME

3.修改tomcat里面conf里面的server.xml配置,修改这3个端口,不能一样

<Server port="8015" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Connector port="8800" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
<Connector port="8019" protocol="AJP/1.3" redirectPort="8443" />

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值