Nginx配置(一)

下载源码安装包:http://nginx.org

稳定版Nginx 1.6.2

tengine: 2.1.2

 

1、安装缺少依赖的包:

(yum install jemalloc)

yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel
#为了支持 rewrite 功能,我们需要安装 pcre
# yum install pcre* //如过你已经装了,请跳过这一步
#需要 ssl 的支持,如果不需要 ssl 支持,请跳过这一步
# yum install openssl*

2、安装Nginx:

./configure --prefix=/usr/local/nginx-1.5.1 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre
make
make install

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

dd

posted @ 2017-06-01 14:58  航飞冲天  阅读(193)  评论(0编辑  收藏  举报