2017年03月28日 09:17:41html
閱讀數:2173nginx
nginx第三方模塊下載地址:服務器
https://www.nginx.com/resources/wiki/modules/dom
nginx地址下載:url
http://nginx.org/en/download.htmlspa
nginx版本號:1.8.1視頻
./configure \
--user=nginx \
--group=nginx \
--prefix=/usr/local/myinstall/nginx \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/subsys/nginx \
--with-http_random_index_module \ #從目錄中隨機選出一個文件做爲主頁
--with-http_ssl_module \ #提供https支持
--with-http_realip_module \ #容許修改請求頭客戶端的ip地址(X-Real-IP和X-Forwarded-For)htm
--with-http_addition_module \ #在客戶端請求的文件的開頭或者結尾添加額外的內容
--with-http_sub_module \ #在客戶端請求的文件,把某些字符串替換
--with-http_dav_module \ #擴展了http協議
--with-http_flv_module \ #搭建flv視頻服務器使用的
--with-http_gzip_static_module \
--with-http_geoip_module \
--add-module=/usr/local/src/nginx/nginx-3rd/nginx-module-url \
--add-module=/usr/local/src/nginx/nginx-3rd/ngx_http_consistent_hash \
--add-module=/usr/local/src/nginx/nginx-3rd/nginx-upstream-fair \
--add-module=/usr/local/src/nginx/nginx-3rd/ngx_cache_purge
其中可能報錯誤,pcre library找不到,下載pcre-devel就能夠了ip
還可能報錯誤,geoip library找不到,下載geoip-devel就能夠了,這個rpm包有可能yum下載找不到,ssl
則須要配置epel源 ,以下
rpm -ivh http://dl.fedoraproject.org/pub/ ... ease-5-4.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5
這樣源就配置好了