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
这样源就配置好了