Centos6.5下搭建Tomcat

安装tomcat了。

其实tomcat安装很方便,在这里下载apache-tomcat-6.0.39.zip . 

‘  直接链接http://apache.fayea.com/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44-deployer.tar.gz

利用ftp客户端将需要的jdk6.0_32 和 apache-tomcat6.0.39.zip包上传到Centos6.5的/ tmp/repo目录下(这里的目录你随意)。

或者也可以在终端中使用命令下载

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. $ wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.39/bin/apache-tomcat-6.0.39.zip  


之后直接解压文件apache-tomcat-6.0.39.zip

到这里,你已经可以使用tomcat来部署你的引用了。

使用一下命令可以启动你的tomcat:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. $ ./apache-tomcat-6.0.39/bin/startup.sh  

访问: http://localhost:8080  测试出现如下说明已经启动。



使用一下命令可以停止你的tomcat:
[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. $ ./apache-tomcat-6.0.39/bin/shutdown.sh  

让tomcat开机启动:

编辑 /etc/rc.d/rc.local

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. $ sudo vi /etc/rc.d/rc.local  
加入如下内容:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. export JAVA_HOME=/usr/local/jdk1.6.0_32  
  2. /home/admin/soft/apache-tomcat-6.0.39/bin/startup.sh  

注意:以上内容的tomcat的主目录请根据自己的安装目录进行调整


如果想要使用脚本来做开机启动,可以参考这里

TOMCAT LINUX 开机启动

CENTOS开机启动TOMCAT

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值