转载:http://blog.csdn.net/bingoxubin/article/details/78689164
应用场景
应用发布需要应用服务器,简单的例如tomcat容器,将页面发布,提供给大家访问!
操作步骤
1. Linux端tomcat安装部署包下载
linux端tomcat安装包下载地址,下载后上传到服务器的opt目录下
2. Linux端jdk的安装部署
3. 安装步骤
3.1 关闭selinux
# vi /etc/selinux/config
……
SELINUX=disabled
……
- 1
- 2
- 3
- 4
- 5
3.2 关闭防火墙
# service iptables stop
# chkconfig iptables off
- 1
- 2
3.3 修改系统文件打开限制数量,增加在配置文件最后
# vim /etc/security/limits.conf
* soft noproc 65535
* hard noproc 65535
* soft nofile 409600
* hard nofile 409600
- 1
- 2
- 3
- 4
- 5
- 6
###3.4 重启服务器
# reboot
- 1
###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
- 1
- 2
- 3
- 4
3.6 设置服务
拷贝bin目录下tomcat-service启动脚本至/etc/init.d/目录下同时重命名为tomcat
# cp /opt/tomcat7/bin/tomcat-service /etc/init.d/tomcat
- 1
修改启动脚本中CATALINA_HOME参数指向安装目录
# vi /etc/init.d/tomcat
export CATALINA_HOME="/opt/tomcat7"
- 1
- 2
- 3
赋予脚本可执行权限
# chmod +x /etc/init.d/tomcat
- 1
3.7 配置开机自启动
# chkconfig --add tomcat
# chkconfig --level 345 tomcat on
服务命令
# service tomcat start | stop | restart | status
注意:若访问不到可能是因为端口号的问题,请进入usr/local/tomcat/conf/server.xml 中更改端口号

575

被折叠的 条评论
为什么被折叠?



