在centos下安装ngix服务及集群php、tomcat

在centos下安装ngix服务及集群php、tomcat

ID:8828800

大小:86.70 KB

页数:8页

时间:2018-04-08

在centos下安装ngix服务及集群php、tomcat_第1页
在centos下安装ngix服务及集群php、tomcat_第2页
在centos下安装ngix服务及集群php、tomcat_第3页
在centos下安装ngix服务及集群php、tomcat_第4页
在centos下安装ngix服务及集群php、tomcat_第5页
资源描述:

《在centos下安装ngix服务及集群php、tomcat》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、在CentOS下安装Ngix服务及集群PHP、Tomcat一、Ngix依赖模块安装Ngix依赖模块有:pcre、zlib、openssl、md5/sha1(如果系统中没有安装相应模块,需要按照下列方式安装)1、安装pcre模块(8.35)官方网站:http://www.pcre.org/安装命令:#unzippcre-8.35.zip#cdpcre-8.35#./configure#make&&makeinstall在64位linux系统中,nginx搜索的库位置为lib64;所以,需要建立软连接:#ln-s

2、/usr/local/lib/libpcre.so.1/lib64/#ln-s/usr/local/lib/libpcre.so.1/lib/#ln-s/usr/local/lib/libpcre.so.1/usr/local/lib64/2、安装zlib模块(1.2.8)官方网站:http://www.zlib.net/安装命令:#tarzxvfzlib-1.2.8.tar.gz#cdzlib-1.2.8#./configure#make&&makeinstall3、安装openssl模块(1.0.1h)官

3、方网站:http://www.openssl.org/安装命令:#tarzxvfopenssl-1.0.1h.tar.gz#cdopenssl-1.0.1h#./config#make&&makeinstall二、Nginx安装1、安装Nginx(1.6.0)官方网站:http://nginx.org/安装命令:#tarzxvfnginx-1.6.0.tar.gz#cdnginx-1.6.0#./configure--prefix=/usr/local/nginx--with-openssl=/usr/lo

4、cal/openssl--with-http_stub_status_module#make&&makeinstall安装完成后的Nginx的目录结构:[root@APnginx-1.6.0]#ll/usr/local/nginx/total16drwxr-xr-x2rootroot4096Jun2414:42confdrwxr-xr-x2rootroot4096Jun2414:42htmldrwxr-xr-x2rootroot4096Jun2414:42logsdrwxr-xr-x2rootroot409

5、6Jun2414:42sbin1、修改配置文件中的监听端口,确保不被其他程序占用修改配置文件:/usr/local/nginx/conf/nginx.conf修改端口:80->90902.1、设置Linux防火墙,打开端口9090执行命令:#/sbin/iptables-IINPUT-ptcp--dport9090-jACCEPT保存设置命令:#/etc/rc.d/init.d/iptablessave查看端口打开情况命令:#/etc/init.d/iptablesstatus重启防火墙服务#/etc/rc.

6、d/init.d/iptablesrestart2、启动、停止NginxA、启动命令#/usr/local/nginx/sbin/nginxB、停止命令#/usr/local/nginx/sbin/nginx-sstopC、检查配置文件#/usr/local/nginx/sbin/nginx-t-c/usr/local/nginx/conf/nginx.confD、查看nginx版本及完整版本#/usr/local/nginx/sbin/nginx–Vnginxversion:nginx/1.6.0#/usr

7、/local/nginx/sbin/nginx–Vnginxversion:nginx/1.6.0builtbygcc4.4.620110731(RedHat4.4.6-3)(GCC)configurearguments:--prefix=/usr/local/nginx--with-openssl=/usr/local/openssl--with-http_stub_status_moduleE、查看帮助#/usr/local/nginx/sbin/nginx–hnginxversion:nginx/1.6

8、.0Usage:nginx[-?hvVtq][-ssignal][-cfilename][-pprefix][-gdirectives]Options:-?,-h:thishelp-v:showversionandexit-V:showversionandconfigureoptionsthenexit-t:testconfigurationandexit-q:suppressnon-errorme

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。