Linux端安装部署tomcat7

应用场景

应用发布需要应用服务器,简单的例如tomcat容器,将页面发布,提供给大家访问!

操作步骤

1. Linux端tomcat安装部署包下载

linux端tomcat安装包下载地址,下载后上传到服务器的opt目录下

2. Linux端jdk的安装部署

Linux端jdk安装部署参考文章

3. 安装步骤

3.1 关闭selinux

 # vi /etc/selinux/config

……
SELINUX=disabled
……

3.2 关闭防火墙

 # service iptables stop
 # chkconfig iptables off

3.3 修改系统文件打开限制数量,增加在配置文件最后

 # vim /etc/security/limits.conf

* soft noproc 65535
* hard noproc 65535
* soft nofile 409600
* hard nofile 409600

###3.4 重启服务器

 # reboot

###3.5 对整个tomcat文件夹赋予读写权限

 # cd /opt
 # tar -xzvf apache-tomcat-7.0.73.tar.gz
 # mv apache-tomcat-7.0.73 tomcat7
 # chmod -R 755 /opt/tomcat7

3.6 设置服务

拷贝bin目录下tomcat-service启动脚本至/etc/init.d/目录下同时重命名为tomcat

 # cp /opt/tomcat7/bin/tomcat-service /etc/init.d/tomcat

修改启动脚本中CATALINA_HOME参数指向安装目录

 # vi /etc/init.d/tomcat

 export CATALINA_HOME="/opt/tomcat7"

赋予脚本可执行权限

 # chmod +x /etc/init.d/tomcat

3.7 配置开机自启动

 # chkconfig --add tomcat
 # chkconfig --level 345 tomcat on

服务命令

 # service tomcat start | stop | restart | status
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值