最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Nginx 平滑升級(jí)的實(shí)現(xiàn)(拒絕服務(wù)漏洞)

 更新時(shí)間:2025年02月21日 08:32:34   作者:Mr-Wanter  
本文主要介紹了Nginx 平滑升級(jí)的實(shí)現(xiàn)(拒絕服務(wù)漏洞),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

前言

Nginx 拒絕服務(wù)漏洞(CVE-2019-9513、CVE-2019-9511)

  • 將 Nginx 升級(jí)到 1.16.1、1.17.3 及以上版本,下載地址:https://nginx.org/en/download.html
  • 若漏洞的檢測(cè)結(jié)果中存在漏洞修復(fù)版本,則將漏洞檢測(cè)結(jié)果中的軟件包升級(jí)到對(duì)應(yīng)漏洞修復(fù)版本及以上。
    參照安全補(bǔ)丁功能中該漏洞的修復(fù)命令進(jìn)行升級(jí),或者參照以下修復(fù)命令進(jìn)行升級(jí):
    CentOS/RHEL/Oracle Linux : sudo yum update -y 需要升級(jí)的軟件包名(參考檢測(cè)結(jié)果)
    SUSE : sudo zypper update -y 需要升級(jí)的軟件包名(參考檢測(cè)結(jié)果)
    Ubuntu/Debian : sudo apt-get update && sudo apt-get install --only-upgrade -y 需要升級(jí)的軟件包名(參考檢測(cè)結(jié)果)
    例:若漏洞的檢測(cè)結(jié)果中主機(jī)系統(tǒng)為 Ubuntu 16.04,軟件包名稱為 nginx,當(dāng)前安裝版本為 1.10.3-0ubuntu0.16.04.4,對(duì)應(yīng)漏洞修復(fù)版本為1.10.3-0ubuntu0.16.04.5,則漏洞修復(fù)命令為 sudo apt-get update && sudo apt-get install --only-upgrade -y nginx-core nginx

一、CentOS 7 Nginx1.12.2平滑升級(jí)到新版本nginx-1.21.5

nginx下載:http://nginx.org/download/

二、操作步驟

1.查看當(dāng)前Nginx版本信息

[root@web ~]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-openssl=/tmp/openssl-1.1.0e --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_image_filter_module --with-mail --with-threads --with-mail_ssl_module --with-stream_ssl_module

2.下載nginx-1.21.5版本到/usr/local/下,解壓并進(jìn)入解壓后的目錄

[root@nginx ~]# cd /usr/local/
[root@nginx ~]# wget http://nginx.org/download/nginx-1.21.5.tar.gz
[root@nginx ~]# tar xf nginx-1.21.5.tar.gz
[root@nginx ~]# cd nginx-1.21.5

3.配置nginx

查看nginx版本的時(shí)候,configure arguments后面有一大串模塊,這也是你第一次安裝nginx時(shí)所指定的模塊,升級(jí)的時(shí)候也要同時(shí)指定,也可以添加其他模塊

[root@nginx nginx-1.21.5]# ./configure \
  --prefix=/usr/local/nginx \
  --user=nginx \
  --group=nginx \
  --with-pcre \
  --with-openssl=/tmp/openssl-1.1.0e \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_realip_module \
  --with-http_addition_module \
  --with-http_sub_module \
  --with-http_dav_module \
  --with-http_flv_module \
  --with-http_mp4_module \
  --with-http_gunzip_module \
  --with-http_gzip_static_module \
  --with-http_random_index_module \
  --with-http_secure_link_module \
  --with-http_stub_status_module \
  --with-http_auth_request_module \
  --with-http_image_filter_module \
  --with-mail \
  --with-threads \
  --with-mail_ssl_module \
  --with-stream_ssl_module \
 && make

make完以后,不需要執(zhí)行make install,否則會(huì)覆蓋安裝,nginx服務(wù)會(huì)出現(xiàn)各種問題

不中斷nginx web服務(wù)器的正常運(yùn)行稱之為平滑升級(jí),先重命名之前的nginx二進(jìn)制文件

[root@nginx nginx-1.21.5]# mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

拷貝剛編譯新生產(chǎn)的Nginx二進(jìn)制文件到/usr/local/nginx/sbin/目錄

[root@nginx nginx-1.21.5]# cp /usr/local/nginx-1.21.5/objs/nginx /usr/local/nginx/sbin/

4.開始執(zhí)行升級(jí)

[root@web nginx-1.21.5]# make upgrade
/usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
sleep 1
test -f /usr/local/nginx/logs/nginx.pid.oldbin
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`

5.查看nginx版本信息

[root@web nginx-1.13.3]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.21.5
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.1.0e  16 Feb 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-openssl=/tmp/openssl-1.1.0e --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_image_filter_module --with-mail --with-threads --with-mail_ssl_module --with-stream_ssl_module

總結(jié)

報(bào)錯(cuò)0

nginx unknown directive “stream”

nginx默認(rèn)安裝的時(shí)候沒有加載stream模塊

需要重新對(duì)源文件進(jìn)行編譯、安裝,通過添加–with-stream參數(shù)指定安裝stream模塊

./configure --with-stream

make & make install

再次檢查nginx.conf配置文件,確認(rèn)配置無語法錯(cuò)誤后,再次嘗試啟動(dòng)服務(wù)。

nginx -t 檢查配置文件是否正確

nginx -c 指定啟動(dòng)的配置文件

報(bào)錯(cuò)1

./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.
原因:缺少依賴
解決:
[root@vm-3 nginx-1.21.5]# yum -y install libxml2 libxslt-devel

再次配置

報(bào)錯(cuò)2

./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.
解決:安裝依賴
yum -y install gd-devel

再次配置

報(bào)錯(cuò)3

./configure: error: perl module ExtUtils::Embed is required
解決:
yum -y install perl-devel perl-ExtUtils-Embed
再次配置

報(bào)錯(cuò)4

./configure: error: the GeoIP module requires the GeoIP library. You can either do not enable the module or install the library.
解決:
yum -y install GeoIP GeoIP-devel GeoIP-data
再次配置

報(bào)錯(cuò)5

./configure: error: the Google perftools module requires the Google perftools
library. You can either do not enable the module or install the library.

到此這篇關(guān)于Nginx 平滑升級(jí)的實(shí)現(xiàn)(拒絕服務(wù)漏洞)的文章就介紹到這了,更多相關(guān)Nginx 平滑升級(jí)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 解析nginx server_name的具體使用

    解析nginx server_name的具體使用

    nginx server_name對(duì)于正確配置虛擬主機(jī)非常重要,本文主要介紹了解析nginx server_name的具體使用,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-08-08
  • Nginx 虛擬主機(jī)配置的三種方式(基于域名)

    Nginx 虛擬主機(jī)配置的三種方式(基于域名)

    Nginx配置虛擬主機(jī)支持3種方式:基于IP的虛擬主機(jī)配置,基于端口的虛擬主機(jī)配置,基于域名的虛擬主機(jī)配置。本文主要介紹了基于域名的實(shí)現(xiàn),感興趣的小伙伴們可以參考一下
    2018-10-10
  • Nginx中default_server指令問題詳解

    Nginx中default_server指令問題詳解

    nginx 的 default_server 指令可以定義默認(rèn)的 server 出處理一些沒有成功匹配 server_name 的請(qǐng)求,下面這篇文章主要給大家介紹了關(guān)于Nginx中default_server指令問題的相關(guān)資料,需要的朋友可以參考下
    2022-12-12
  • Nginx配置WSS安全WebSocket代理的實(shí)現(xiàn)

    Nginx配置WSS安全WebSocket代理的實(shí)現(xiàn)

    本文詳細(xì)介紹Nginx配置WSS(WebSocket安全連接)的方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2025-12-12
  • 講解Nginx服務(wù)器中設(shè)置本地瀏覽器緩存的簡(jiǎn)單方法

    講解Nginx服務(wù)器中設(shè)置本地瀏覽器緩存的簡(jiǎn)單方法

    這篇文章主要介紹了Nginx服務(wù)器中設(shè)置本地瀏覽器緩存的簡(jiǎn)單方法,需要的朋友可以參考下
    2015-12-12
  • Nginx可視化nginxWebUI的具體使用

    Nginx可視化nginxWebUI的具體使用

    NginxWebUI 是一款圖形化管理 nginx 配置的工具,可以使用網(wǎng)頁(yè)來快速配置 nginx單機(jī)與集群的各項(xiàng)功能,本文就來介紹一下Nginx網(wǎng)頁(yè)配置工具nginxWebUI的具體使用,感興趣的可以了解一下
    2023-08-08
  • Nginx日志配置的使用及說明

    Nginx日志配置的使用及說明

    這篇文章主要介紹了Nginx日志配置的使用及說明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2025-07-07
  • 一文搞懂Nginx限流(簡(jiǎn)單實(shí)現(xiàn))

    一文搞懂Nginx限流(簡(jiǎn)單實(shí)現(xiàn))

    這篇文章主要介紹了一文搞懂Nginx限流(簡(jiǎn)單實(shí)現(xiàn)),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2019-05-05
  • 在Ubuntu20.04上安裝Kubernetes集群

    在Ubuntu20.04上安裝Kubernetes集群

    容器化為開發(fā)人員提供了很大的靈活性,最常用的容器化應(yīng)用程序之一是 Docker,在容器上部署服務(wù)的主要原因之一是它們靈活、輕量級(jí)并且在部署在數(shù)百臺(tái)機(jī)器上時(shí)易于擴(kuò)展,但是,誰來管理所有這些容器?這就是 Kubernetes 發(fā)揮作用的地方
    2023-12-12
  • Windows下用Nginx代理Django安裝配置實(shí)例

    Windows下用Nginx代理Django安裝配置實(shí)例

    這篇文章主要介紹了Windows下用Nginx代理Django安裝配置實(shí)例,本文講解了安裝djanjo、用djanjo生成簡(jiǎn)單web頁(yè)面、用nginx進(jìn)行代理等內(nèi)容,需要的朋友可以參考下
    2015-03-03

最新評(píng)論

常德市| 漳浦县| 汝城县| 历史| 长春市| 北辰区| 柳林县| 贡嘎县| 莱州市| 正蓝旗| 霍邱县| 淮南市| 晋州市| 佳木斯市| 通州区| 略阳县| 福建省| 昌都县| 南昌市| 黄浦区| 什邡市| 阿瓦提县| 和林格尔县| 德兴市| 平昌县| 长乐市| 顺义区| 新竹县| 当雄县| 修水县| 和林格尔县| 定南县| 盱眙县| 鄯善县| 房山区| 罗甸县| 兴和县| 鲜城| 托里县| 汉源县| 石景山区|