linux下安装多个tomcat

时间:2022-12-03 19:09:59
  1. 先安装java环境变量
  2. 解压tomcat.从命名为tomcat1 .tomcat2.
  3. vim /etc/profile.添加一下类容:

catalina1_base=/usr/java/tomcat7
catalina1_home=/usr/java/tomcat7
tomcat1_home=/usr/java/tomcat7
export catalina1_base catalina1_home tomcat1_home

catalina2_base=/usr/java/tomcat7-2
catalina2_home=/usr/java/tomcat7-2
tomcat2_home=/usr/java/tomcat7-2
export catalina2_base catalina2_home tomcat2_home

使profile生效。source /etc/profile。
4.修改tomcat2/bin/下的startup.sh。vim /startup.sh

export CATALINA_BASE=$catalina2_base
export CATALINA_HOME=$catalina2_home

5.修改tomcat2/conf下的server.xml修改一下类容
linux下安装多个tomcat
linux下安装多个tomcat
6.分别启动tomcat1和tomcat2.