ITPub博客

首页 > IT基础架构 > 网络安全 > J2EE学习笔记:安装ZIP版tomcat

J2EE学习笔记:安装ZIP版tomcat

原创 网络安全 作者:cdxueq 时间:2007-01-13 11:48:35 0 删除 编辑
今天配置了两个zip版本的tomcat,把整个过程记录在这里,有了这个可以方便随时切换使用多个版本的tomcat进行测试。[@more@]

以前一直都是用的安装版本,今天发现zip版本的其实更好用,关键是可以不手工查看日志,就能够看见错在哪里,:)

安装zip版本tomcat时的配置样本

//好处,不需要运行安装,方便随时切换使用多个版本的tomcat

安装JDK1.5_09到 C:Java下

下载并且解压jakarta-tomcat-5.0.28
在我的路径是:D:Programj2eejakarta-tomcat-5.0.28

设置环境变量:
特别注意!下面JAVA_HOME和CATALINA_HOME两个后面都没有带分号

建议不要在系统环境变量上修改,而在当前用户下新建下面四个环境变量

JAVA_HOME: C:Javajdk
CATALINA_HOME: D:Programj2eejakarta-tomcat-5.0.28
classpath: .;%JAVA_HOME%lib;%CATALINA_HOME%commonlib;
path: %JAVA_HOME%bin;%CATALINA_HOME%bin;

先测试以下tomcat-5.0.28:


新开一个DOS窗口,并切换到%CATALINA_HOME%bin目录后使用catalina查看启动参数
D:Programj2eejakarta-tomcat-5.0.28bin>catalina
Using CATALINA_BASE: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_HOME: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: D:Programj2eejakarta-tomcat-5.0.28temp
Using JAVA_HOME: C:Javajdk
Usage: catalina ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina
version What version of tomcat are you running?

新开窗口启动
D:Programj2eejakarta-tomcat-5.0.28bin>catalina start
Using CATALINA_BASE: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_HOME: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: D:Programj2eejakarta-tomcat-5.0.28temp
Using JAVA_HOME: C:Javajdk

关闭
D:Programj2eejakarta-tomcat-5.0.28bin>catalina stop
Using CATALINA_BASE: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_HOME: D:Programj2eejakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: D:Programj2eejakarta-tomcat-5.0.28temp
Using JAVA_HOME: C:Javajdk

D:Programj2eejakarta-tomcat-5.0.28bin>

如果要使用别的版本的tomcat只需要修改CATALINA_HOME即可。

测试tomcat-5.5.20:

如设置使用apache-tomcat-5.5.20,只需重新设置
CATALINA_HOME:D:Programj2eeapache-tomcat-5.5.20


D:Programj2eeapache-tomcat-5.5.20>catalina
Using CATALINA_BASE: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_HOME: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_TMPDIR: D:Programj2eeapache-tomcat-5.5.20temp
Using JRE_HOME: C:Javajdk
Usage: catalina ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina
version What version of tomcat are you running?

D:Programj2eeapache-tomcat-5.5.20>catalina start
Using CATALINA_BASE: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_HOME: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_TMPDIR: D:Programj2eeapache-tomcat-5.5.20temp
Using JRE_HOME: C:Javajdk

D:Programj2eeapache-tomcat-5.5.20>catalina stop
Using CATALINA_BASE: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_HOME: D:Programj2eeapache-tomcat-5.5.20
Using CATALINA_TMPDIR: D:Programj2eeapache-tomcat-5.5.20temp
Using JRE_HOME: C:Javajdk

D:Programj2eeapache-tomcat-5.5.20>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7224393/viewspace-889391/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    10
  • 访问量
    77185