1. 程式人生 > 其它 >linux系統部署多個tomcat

linux系統部署多個tomcat

技術標籤:tomcat

  • 1、修改環境變數

vim /etc/profile
在檔案末尾加入:
在這裡插入圖片描述

#第一個tomcat檔案配置#
CATALINA_1_BASE=/home/soft/tomcat9.0.41
CATALINA_1_HOME=/home/soft/tomcat9.0.41
TOMCAT_1_HOME=/home/soft/tomcat9.0.41
export CATALINA_1_BASE CATALINA_1_HOME TOMCAT_1_HOME

  • 2、是配置檔案生效

source /etc/profile

  • 3、修改tomcat中配置

在tomcat/bin/catalina.sh中新增如下配置:
在這裡插入圖片描述

 export
CATALINA_BASE=$CATALINA_1_BASE export CATALINA_HOME=$CATALINA_1_HOME
  • 注意:

    保證tomcat中的埠沒有佔用