gembin

OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

HBase, Hadoop, ZooKeeper, Cassandra

Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

About Me

 

如何同时启动多个Tomcat服务器

 
 
出于某种需要,需要同时启动多个Tomcat服务器

所用Tomcat服务器都为zip版,非安装版。以两个为例:
安装第二个Tomcat完成后,到安装目录下的conf子目录中打开server.xml文件,查找以下三处:

  (1) 修改http访问端口(默认为8080端口)
          
<Connector   className="org.apache.coyote.tomcat4.CoyoteConnector"   port="8080"  
                               minProcessors
="5"   maxProcessors="75"
   
                                enableLookups
="true"   redirectPort="8443"
   
                                acceptCount
="100"   debug="0"   connectionTimeout="20000"
   
                                useURIValidationHack
="false"   disableUploadTimeout="true"   />
 

(大概在86行左右)将8080修改为第一个tomcat不在使用的端口号。此处所设的端口号即是以后访问web时所用的端口号。   

  (2) 修改Shutdown端口(默认为8005端口) 
    
<Server port="8005" shutdown="SHUTDOWN" debug="0">

 
 
 (大概在13行左右)将8005修改为没有在使用的端口号,例如8095    

  (3) 修改8009端口 
          
   < Connector    className ="org.apache.coyote.tomcat4.CoyoteConnector"    
                                port
 ="8009"    minProcessors ="5"    maxProcessors ="75" 
   
                                enableLookups
 ="true"    redirectPort ="8443" 
   
                                acceptCount
 ="10"    debug ="0"    connectionTimeout ="20000" 
  
                                useURIValidationHack
 ="false" 
   
                               protocolHandlerClassName
 ="org.apache.jk.server.JkCoyoteHandler" /> 

  (大概在107行左右)将8009修改为没有在使用的端口号,例如8099   
    
这样就没问题了。

posted on 2007-09-21 11:15 gembin 阅读(1056) 评论(1)  编辑  收藏

评论

# re: 如何同时启动多个Tomcat服务器 2007-09-22 00:14 千里冰封

呵呵,挺实用的,不错一般很少碰到  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

常用链接

留言簿(6)

随笔分类(440)

随笔档案(378)

文章档案(6)

新闻档案(1)

相册

收藏夹(9)

Adobe

Android

AS3

Blog-Links

Build

Design Pattern

Eclipse

Favorite Links

Flickr

Game Dev

HBase

Identity Management

IT resources

JEE

Language

OpenID

OSGi

SOA

Version Control

最新随笔

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜

free counters