更新时间:2023-08-03 GMT+08:00
分享

安装安全更新

  • 执行yum upgrade --security命令,安装全部安全更新。
    [root@localhost ~]# yum upgrade --security
    Last metadata expiration check: 5:21:24 ago on Tue 13 Sep 2022 09:43:13 AM CST.
    Dependencies resolved.
    =================================================================
    Package		Arch		Version			      Repository	Size
    =================================================================
    Installing:
    Kernel		x86_64		5.10.0-60.18.0.50.h498_2.hce2	hce2		49 M
    Upgrading:
    Curl	        x86_64		7.79.1-2.h6.hce2	        hce2		147 k
    ……
    Transaction Summary
    =================================================================
    Install   1 Package
    Upgrade  22 Packages
    Total download size: 69 M
    Is this ok [y/N]:
  • 执行yum upgrade --sec-severity={Critical,Important,Moderate,Low}命令,安装指定级别的安全更新。

    {}中的安全更新等级参数可任意组合。

    [root@localhost ~]# yum upgrade --sec-severity=Moderate
    Last metadata expiration check: 0:32:27 ago on Thu 08 Sep 2022 05:30:23 PM CST.
    Dependencies resolved.
    =================================================================
    Package	                Architecture	        Version			 Repository	    Size
    =================================================================
    Upgrading:
    gnupg2		        x86_64		        2.2.32-1.h6.hce2	  hce2		    2.2 M
    python3-unbound         x86_64                  1.13.2-3.h2.hce2          hce2              96 k
    unbound-libs            x86_64	                1.13.2-3.h2.hce2	  hce2		    505 k
    Transaction Summary
    =================================================================Upgrade		3 Packages
    Total download size: 2.8 M
    Is this ok [y/N]:
  • 执行yum upgrade --advisory =<SA ID>命令,安装指定SA ID的安全更新。

    多个软件包之间使用英文逗号分隔。

    root@localhost ~]# yum upgrade --advisory=HCE2-SA-2022-0033
    Last metadata expiration check: 1:48:44 ago on Tue 13 Sep 2022 09:43:13 AM CST.
    Dependencies resolved.
    =================================================================
    Package              Architecture            Version	            Repository	       Size
    =================================================================
    Upgrading:
    python3-rpm	        x86_64		4.17.0-8.h13.hce2		hce2		87 k
    rpm			x86_64		4.17.0-8.h13.hce2		hce2		498 k
    rpm-libs		x86_64		4.17.0-8.h13.hce2		hce2		376 k
    Transaction Summary
    =================================================================
    Upgrade  3 Packages
    Total download size: 962 k
    Is this ok [y/N]:
  • 执行yum upgrade --cve=<CVE ID>命令,安装指定CVE ID的安全更新。

    多个软件包之间使用英文逗号分隔。

    [root@localhost ~]# yum upgrade --cve=CVE-2021-28861
    Last metadata expiration check: 5:16:36 ago on Tue 13 Sep 2022 09:43:13 AM CST.
    Dependencies resolved.
    =================================================================
    Package			      Architecture	Version			Repository	Size
    =================================================================
    Upgrading:
    python3				x86_64	       3.9.9-7.h10.hce2	        hce2	        8.0 M
    python3-unversioned-command	x86_64	       3.9.9-7.h10.hce2	        hce2	        3.9 k
    Transaction Summary
    =================================================================
    Upgrade  2 Packages
    Total download size: 8.0 M
    Is this ok [y/N]:
分享:

    相关文档

    相关产品