步骤一:安装依赖包及常见软件
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