自动安装带nginx_upstream_check_module模块的Nginx脚本
2015-01-21 17:44
666 查看
#!/bin/bash useradd -s /sbin/nologin -M nginx yum install pcre pcre-devel zlib zlib-devel openssl-devel openssl patch gcc -y mkdir /software;cd /software wget http://nginx.org/download/nginx-1.4.6.tar.gz wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master -O master.zip wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip tar zxvf GeoIP-1.4.8.tar.gz && cd GeoIP* && ./configure && make && make install cd /software/ && tar zxvf nginx-1.4.6.tar.gz && tar zxvf ngx_cache_purge-2.1.tar.gz -C /usr/local/ unzip -d /usr/local/ /software/master.zip unzip -d /usr/local/ /software/ngx_req_status.zip cd /software/nginx-1.4.6 && patch -p1 < /usr/local/nginx_upstream_check_module-master/check_1.2.6+.patch patch -p1 < /usr/local/ngx_req_status-master/write_filter.patch cat > /etc/ld.so.conf << EOF include ld.so.conf.d/*.conf /usr/local/lib EOF ldconfig cd /software/nginx-1.4.6 && ./configure --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=nginx --group=nginx --with-pcre --with-http_gzip_static_module --with-http_ssl_module --with-http_realip_module --with-http_geoip_module --add-module=/usr/local/nginx_upstream_check_module-master --add-module=/usr/local/ngx_cache_purge-2.1 --add-module=/usr/local/ngx_req_status-master && make -j2 && make install
关于nginx_upstream_check的官方参考:https://github.com/yaoweibin/nginx_upstream_check_module/blob/master/README
相关文章推荐
- nginx入门学习—— 在已安装好的nginx上添加nginx_upstream_check_module模块(三)
- centos6.5生产环境编译安装nginx-1.11.3并增加第三方模块ngx_cache_purge、nginx_upstream_check、ngx_devel_kit、lua-nginx
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- nginx 健康检查模块 nginx_upstream_check_module
- nginx 模块nginx_upstream_check_module
- Nginx 负载均衡 后端 监控检测 nginx_upstream_check_module 模块的使用
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- 022_nginx常用模块之ngx_http_upstream_check_module
- 安装nginx_upstream_check_module时make出错,求助
- nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况
- centos6.5生产环境编译安装nginx-1.11.3并增加第三方模块ngx_cache_purge、nginx_upstream_check、ngx_devel_kit、lua-nginx
- Nginx 负载均衡 后端 监控检测 nginx_upstream_check_module 模块的使用
- nginx下后端realserver健康检测模块ngx_http_upstream_check_module
- nginx图片过滤处理模块http_image_filter_module安装配置
- nginx安装并支持upstream和tcp代理模块
- Nginx 负载均衡模块 ngx_http_upstream_module 详述