Centos7安裝nginx1.17.5,集成upstream和stream


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

1 yum install  lrzsz python-devel gcc gcc-c++ pcre  pcre-devel   patch   unzip   zlib  zlib-devel  openssl openssl-devel  git  jemalloc -y
View Code

步驟二:下載upstream和下載nginx

1 cd /usr/local/src
2 git clone https://github.com/yaoweibin/nginx_upstream_check_module.git
View Code

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

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM