步驟一:安裝依賴包及常見軟件

1 yum install lrzsz python-devel gcc gcc-c++ pcre pcre-devel patch unzip zlib zlib-devel openssl openssl-devel git jemalloc -y
步驟二:下載upstream和下載nginx

1 cd /usr/local/src 2 git clone https://github.com/yaoweibin/nginx_upstream_check_module.git
Nginx到http://nginx.org/官網下載
wget http://nginx.org/en/download.html
tar -zxvf nginx-1.17.5.tar.gz
步驟三:upstream打補丁
cd /usr/local/src/nginx-1.17.5 patch -p1 </usr/local/src/nginx_upstream_check_module-master/check_1.16.1+.patch
步驟四:安裝Nginx
./configure --with-http_ssl_module --with-http_stub_status_module --prefix=/usr/local/nginx --add-module=/usr/local/src/nginx_upstream_check_module-master/ --with-http_v2_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-pcre-jit - --with-pcre --with-stream
make && make install