centos6.4
nginx编译添加模块
nginx_upstream_check_modules
#下载http://nginx.org/en/download.html/nginx-1.9.15.tar.gz
$wget http://nginx.org/en/download.html/nginx-1.9.15.tar.gz
$tar -zxf nginx-1.9.15.tar.gz
#下载nginx_upstream_check_modules模块
$wget https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.zip
$unzip nginx_upstream_check_module-master.zip
$cd nginx-1.9.15
$patch -p0 < /opt/nginx_upstream_check_module-master/check_1.9.2+.patch #添补丁
# patch -p 0 (p是指路径,后面的数字表示去掉的第几部分。0,表示不去掉,为全路径)
$./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre --add-module=/opt/nginx_upstream_check_module-master
#编译,添加模块
$make && make install
$cd /usr/local/nginx/
$grep -vE ‘^$|^#| *#‘ conf/nginx.conf
upstream test {
server 10.0.3.169:80;
check interval=3000 rise=2 fall=5 timeout=1000;
}
$sbin/nginx本文出自 “运维基础” 博客,请务必保留此出处http://phospherus.blog.51cto.com/7824598/1774455
nginx添加nginx_upstream_check_modules
原文:http://phospherus.blog.51cto.com/7824598/1774455