Linux端安装部署tomcat7

来源:互联网 发布:vip电影源码 编辑:程序博客网 时间:2024/05/24 01:47

应用场景

应用发布需要应用服务器,简单的例如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
原创粉丝点击