windows下Tomcat配置多例項

2021-09-24 17:13:22 字數 1794 閱讀 6942

先來了解一下catalina_homecatalina_base區別:

官方文件上的解釋:

throughout the docs, you'll notice there are numerous references to $catalina_home. 

this represents the root of your tomcat installation.

when we say, "this information can be found in your $catalina_home/readme.txt file" we mean to look at the readme.txt file at the root of your tomcat install.

optionally, tomcat may be configured for multiple instances by defining $catalina_base for each instance.

if multiple instances are not configured, $catalina_base is the same as $catalina_home.

翻譯過來就是catalina_home是tomcat的安裝目錄,catalina_base是tomcat的工作目錄

1.檔案結構

tomcat檔案下保留共有的bin和lib檔案,另建instance資料夾

instance資料夾:

instance1資料夾:

2.修改每個例項的server.xml檔案,修改裡面的埠,讓每個例項用到埠不衝突:

3.每個例項檔案下建立startup.bat、stop.bat檔案:例項一(instance1):

startup.bat:

set catalina_base=%cd%

set title=instance1

cd ../../bin

catalina.bat start

stop.bat:

set catalina_base=%cd%

set title=instance1

cd ../../bin

catalina.bat stop

例項二(instance2)內容除了set title=instance1改為set title=instance2,其他一樣

4.啟動:

分別雙擊各個例項下的startup.bat

windows下的virtualbox配置串列埠

windows下的virtualbox配置串列埠 因為需要讀取嵌入式裝置串列埠的資料,在virtualbox中啟動想讀物理機的串列埠com1,老是失敗。最後找了下別人講的,有幾個注意的地方,整理放下面。1.先保證usb裝置是啟用的 不知道是不是確定必須要,但我是這樣做的 2.在 設定 系統 擴充套件...

windows平台下tomcat6 0的配置使用

學完html,js,然後進軍j2ee 的準備當然是servlet的容器啦,今天配置了一下,蠻好的,一次成功,先寫下來 1.tomcat的安裝 這個很容易,在win的平台下一向是next下去就可以了,不過路徑覺得還是選個層次少的,我就扔d tomcat6.0底下 2.tomcat的配置 1 我個人是很...

Memcached在Windows下的配置和使用

開啟控制台,進入memcached主程式目錄,輸入 memcached.exe d install 安裝memcached服務 memcached.exe d start 開啟memcached服務 此時會看到程序中多了乙個memcached的服務程序。開啟新的控制台,輸入 telnet 你的伺服器...