tomcat installation and configuration guide

Tomcat installation guide


1. download tomcat from http://tomcat.apache.org/download-70.cgi , please download stable version.
2. uncompress the downloaded installation file to /usr.
3. go to the conf directory and modify the connector port in web.xml if necessary.
4. change tomcat-users.xml if want to access by browser
example:
<tomcat-users>
<user username="both" password="tomcat" roles="tomcat,role1,manager-gui"/>
</tomcat-users>

5. config the Environment Variable as follows:
a. vi /etc/profile
b. CATALINA_BASE = /usr/apache-tomcat-*.*.*
  CATALINA_HOME = /usr/apache-tomcat-*.*.*
c. export  CATALINA_BASE
  export  CATALINA_HOME
d. source /etc/profile

6. use ./startup.sh to run.






configure more than one tomcat on one server by following steps:


1. uncompress the installation file to a new directory, for example, /usr/tomcatServer2
2. add two new environment variables :
a. vi /etc/profile
b. CATALINA_BASE2 = /usr/tomcatServer2
  CATALINA_HOME2 = /usr/tomcatServer2
c. export  CATALINA_BASE2
  export  CATALINA_HOME2
d. source /etc/profile
3. edit tomcatServer2/bin/catalina.sh, change all CATALINA_BASE and CATALINA_HOME into CATALINA_BASE2 and CATALINA_HOME2 respectively 
4. edit tomcatServer2/conf/server.xml, change all the port number from 8*** to 9***


example:
<Connector port="9080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="9443" URIEncoding='UTF-8'/>
    =====================        
    <Connector port="9009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="9443" URIEncoding='UTF-8'/>
5. cd to /usr/tomcatServer2/bin, then use command "sh startup.sh" to run tomcat.


reference:
http://www.cnblogs.com/itolssy/archive/2008/08/27/1278041.html
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值