linux下搭建tomcat

Posted on 2007-04-10 18:45 Test8848-谷峰 阅读(1366) 评论(0)  编辑 收藏 引用 所属分类: 软件测试-unix环境搭建

环境:
redhat linux 9.0
jdk-1_5_0-linux-i586-rpm.bin
apache-tomcat-5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++
注意事项
首先需要有jdk-1_5_0-linux-i586-rpm包,事实上j2sdk-1_4_2-linux-i586也可以
,但是经过实验,一定要注意使用了j2sdk-1_4_2-linux-i586后,很有可能tomcat连接时会出现“连接拒绝访问”,这个一定要注意,这个小东东一定要引起警觉。换了1.5.0的就没事,可能是与tomcat版本兼容性问题。

解决方法

1.升级jdk,网上有很多帖子求助说:“如何卸载jdk1.4.2”,其实可以参照jdk的官方文档
地址:http://java.sun.com/j2se/1.5.0/install-linux.html
——————————————————————————————————————————
Upgrading from Previous Versions: If you have a previous release of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start applications will have to be downloaded again. This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have not changed, so all your settings will remain intact after the upgrade.
————————————————————————————————————————————
我只摘录了一部分,关于卸载jdk的原话,大概意思:其实不用卸载jdk1.4.2,完全覆盖就可以了,覆盖会保存原有的配置文件。再次证明:官方网站究竟是多么重要,顺便同情一下网上发帖求助卸载1.4.2的朋友,嘿嘿

安装方法
1.将jdk-1_5_0-linux-i586-rpm(这其实是个bin文件),拷贝到你的主目录下,运行./jdk-1_5_0-linux-i586-rpm
2.bin文件会自动将jdk相关文件安装到/usr/java/jdk1.5.0/下
3.安装tomcat,直接运行tar zxvf apache-tomcat-5.tar
4.由于tomcat文件夹名字较长,不好切换,做个软连接ln -s apache-tomcat-5.tar tomcat
5.设置变量export JAVA_HOME=/usr/java/jdk1.5.0/
6.切换到tomcat的bin文件夹下运行./startup.sh,如果不出现以外将弹出下列信息

7.想要停掉tomcat的话就运行./shutdown.sh
8.输入tomcat主机地址:http://localhost:8080
9.大功告成

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

posts - 28, comments - 17, trackbacks - 0, articles - 0

Copyright © Test8848-谷峰