nginx 安装教程

Nginx 安装教程

本教程在CentOS6.7中安装nginx 1.8.0,Nginx中加入了taobao的concat模块,nginx-upload-module模块,pcre 以及nginx-upload-progress-module四个模块。

 

下载依赖文件:

wget 'http://nginx.org/download/nginx-1.8.0.tar.gz'

git clone git://github.com/alibaba/nginx-http-concat.git

git clone -b 2.2 https://github.com/vkholodkov/nginx-upload-module

git clone 'https://github.com/masterzen/nginx-upload-progress-module.git'

wget 'http://nchc.dl.sourceforge.net/project/pcre/pcre2/10.20/pcre2-10.20.zip'

  

安装pcre模块

unzip pcre2-10.20.zip

cd pcre2-10.20

./configure && make && make install

 

安装nginx

nginx-http-concat ,nginx-upload-module, nginx-upload-progress-module 三个模块文件加与nginx文件夹同级。

 

tar xvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./configure --prefix=/usr/local/nginx --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --error-log-path=/var/log/httpd/error_log \
            --http-log-path=/var/log/httpd/access_log --with-http_ssl_module --with-http_dav_module --with-http_flv_module --with-http_realip_module \
            --with-http_gzip_static_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-pcre --with-debug  \
            --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy \
       --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi\
--add-module=../nginx-http-concat/--add-module=../nginx-upload-module/ --add-module=../nginx-upload-progress-module/ make && make install

 

至此,nginx 安装完毕。 本文不涉及nginx 配置相关内容。

 

posted @ 2016-01-07 17:50  搬砖程序员带你飞  阅读(340)  评论(0编辑  收藏  举报