linghaiyan 发表于 2018-11-8 11:13:22

自动安装带nginx_upstream_check_module模块的Nginx脚本

#!/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
页: [1]
查看完整版本: 自动安装带nginx_upstream_check_module模块的Nginx脚本