本教程在CentOS6.7中安裝nginx 1.8.0,Nginx中加入了taobao的concat模塊,nginx-upload-module模塊,pcre 以及nginx-upload-progress-module四個模塊。nginx
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'
unzip pcre2-10.20.zip cd pcre2-10.20 ./configure && make && make install
nginx-http-concat ,nginx-upload-module, nginx-upload-progress-module 三個模塊文件加與nginx文件夾同級。git
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 配置相關內容。github