找回密码
 注册

ɨһɨ΢

QQ¼

ֻһٿʼ

搜索
安徽家装论坛管理细则
查看: 625|回复: 0

在CentOs5如何部署tomcat

[复制链接]
发表于 2014-2-18 17:40:00 | 显示全部楼层 |阅读模式
配置手工启动的过程
一、在root用户下操作
1、需要安装的支撑软件包
kernel-headers-2.6.18
glibc-headers-2.5-42
glibc-devel-2.5-42
libgomp-4.4.0-6
gcc-4.1.2

2、新建一个用户,此文以zhongsheng用户为例
useradd zhongsheng
passwd zhongsheng
(如果要在同一台机器上既起oracle也起tomcat的话,请参照oracle安装文档中的用户添加)

3、将jdk-6u21-ea-bin-b05-linux-i586-29_may_2010.bin和apache-tomcat-6.0.24.zip拷

入/home/zhongsheng目录下。

4、改变这两个文件的属组。
chown zhongsheng.zhongsheng jdk-6u21-ea-bin-b05-linux-i586-29_may_2010.bin
chown zhongsheng.zhongsheng apache-tomcat-6.0.24.zip

二、在zhongsheng用户下操作
进入/home/zhongsheng
5、改变文件的权限
chmod 777 jdk-6u21-ea-bin-b05-linux-i586-29_may_2010.bin
chmod 777 apache-tomcat-6.0.24.zip

6、解压文件
执行命令
./jdk-6u21-ea-bin-b05-linux-i586-29_may_2010.bin   
得到jdk1.6.0_21目录
执行命令
unzip apache-tomcat-6.0.24.zip
得到apache-tomcat-6.0.24目录

7、将要部署的文件放入以下指定目录
/home/zhongsheng/apache-tomcat-6.0.24/webapps

8、改变文件夹的可执行权限
chmod –Rf 777 jdk1.6.0_21
chmod –Rf 777 apache-tomcat-6.0.24

9、设置zhongsheng的环境变量
vim .bash_profile
export JAVA_HOME=/home/zhongsheng/jdk1.6.0_21
export CLASSPATH=$JAVA_HOME/lib/tools.jarJAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/binPATH
export TOMCAT_HOME=/home/zhongsheng/apache-tomcat-6.0.24

10、启动tomcat
执行命令
/home/zhongsheng/apache-tomcat-6.0.24/bin/startup.sh
一般会显示类似如下信息
Using CATALINA_BASE:   /home/zhongsheng/apache-tomcat-6.0.24
Using CATALINA_HOME:   /home/zhongsheng/apache-tomcat-6.0.24
Using CATALINA_TMPDIR: /home/zhongsheng/apache-tomcat-6.0.24/temp
Using JRE_HOME:        /home/zhongsheng/jdk1.6.0_21
Using CLASSPATH:       /home/zhongsheng/apache-tomcat-6.0.24/bin/bootstrap.jar
11、检查tomcat是否启动
执行命令
netstat –tnl
如果在列表中能看到TCP 8080端口的监听,就表示tomcat启动完成了。
此时应该可以通过浏览器连到服务器的8080端口,看到tomcat的页面了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表