首页 > 其他 > 详细

centos nginx 安装

时间:2016-02-18 11:43:40      阅读:168      评论:0      收藏:0      [点我收藏+]

1.下载

wget http://nginx.org/download/nginx-1.7.8.tar.gz

2.解压

tar -zxvf nginx-1.7.8.tar.gz

3.切换目录

cd nginx-1.7.8

4.安装

./configure --prefix=/usr/local/nginx-1.7.8 \

--with-http_ssl_module --with-http_spdy_module \

--with-http_stub_status_module --with-pcre

此时发生了错误:

错误1:./configure: error: the HTTP rewrite module requires the PCRE library.

解决:yum -y install pcre*

错误2:./configure: error: SSL modules require the OpenSSL library.

解决:yum -y install openssl*

然后

make

make install

5.启动

/usr/local/nginx-1.7.8/sbin/nginx

6.关闭防火墙

service iptables stop

技术分享

centos nginx 安装

原文:http://www.cnblogs.com/hjyang2012/p/5197430.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!