1. 程式人生 > >windows下單機如何配置多個TOMCAT

windows下單機如何配置多個TOMCAT

home bat文件 clas protocol bin 1.8 tomcat 依賴 apache

1、JDK-環境配置:

JAVA_HOME=D:\Program Files\Java\jdk1.7.0_45

CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

Path=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

2、免安裝版TOMCAT:

TOMCAT1-環境配置

CATALINA_BASE=D:\Program Files\apache-tomcat-7.0.47

CATALINA_HOME=D:\Program Files\apache-tomcat-7.0.47

Path=%CATALINA_HOME%\lib;%CATALINA_HOME%\bin;

conf下server.xml

Server port=8006 shutdown="SHUTDOWN";

Connector port=80 protocol="HTTP/1.1";

Connector port=8009 protocol="AJP/1.3"

TOMCAT2-環境配置

CATALINA_BASE_7M=D:\Program Files\apache-tomcat-7.0.47-8080

CATALINA_HOME_7M=D:\Program Files\apache-tomcat-7.0.47-8080

Path=%CATALINA_HOME_7M%\lib;%CATALINA_HOME_7M%\bin;

bin下catalina.bat、service.bat、shutdown.bat、startup.bat中“CATALINA_BASE”改為“CATALINA_BASE_7M”,“CATALINA_HOME”改為“CATALINA_HOME_7M”

conf下server.xml

Server port=8086 shutdown="SHUTDOWN";

Connector port=8080 protocol="HTTP/1.1";

Connector port=8089 protocol="AJP/1.3"

3、不依賴環境變量中,指定jdk:找到bin下的setclasspath.bat文件;在文件的開始出添加如下代碼:

set JAVA_HOME=D:\Program Files\Java\jdk1.8.0_60

set JRE_HOME=D:\Program Files\Java\jre1.8.0_60

windows下單機如何配置多個TOMCAT