yum只更新安全补丁操作方法

来源:互联网 发布:软件项目风险控制ppt 编辑:程序博客网 时间:2024/05/21 09:22

转载请注明出处:http://club.topsage.com/thread-355324-1-1.html

为了保证Linux系统的稳定运行,系统管理员在升级系统时多数时候只关心其中的安全更新部分,而纯粹软件版本的升级是不必根的,因为升级它们有可能出现不可预知的问题。那么,我们又如何仅列出或是安装系统更新中的安全更新部分呢?比如CVE、bugs,还有补丁的一些信息?

这里给大家介绍一个yum命令的插件软件包 yum-security。这个插件赋给yum命令 --security、--cve、-bz、--advisory等可选参数和 list-security、info-security两个命令。这些命令能限制yum命令只列出或升级特定的安全相关的软件包。而那两个新增的命令可以给出安全相关的一些信息。

安装yum-security插件

此插件适用于 CentOS v5.1 / RHEL v5.1 / Fedora v7 及以上版本

输入如下命令:

  1. # yum install yum-security
复制代码
会得到类似于下面的输出内容:
Loaded plugins: rhnplugin, security
RHSA-2009:1148-1 security httpd-2.2.3-22.el5_3.2.x86_64
RHSA-2009:1148-1 security httpd-devel-2.2.3-22.el5_3.2.i386
RHSA-2009:1148-1 security httpd-manual-2.2.3-22.el5_3.2.x86_64
RHSA-2009:1148-1 security mod_ssl-1:2.2.3-22.el5_3.2.x86_64
list-security done


安装完成后,就可以用下面的命令列出安全相关的系统更新了,
  1. # yum --security check-update
复制代码
如果你想检查一下系统已安装的软件有没有bugs及相应补丁包的话,可以用下面的命令,
  1. # yum list-security bugzillas
复制代码
使用infor-security能了解更详细的补丁信息,如:
  1. # yum info-security RHSA-2009:1148-1
复制代码
示例输出:
Loaded plugins: rhnplugin, security

===============================================================================
  RHSA-2009:1148
===============================================================================
  Update ID : RHSA-2009:1148-1
    Release :
       Type : security
     Status : final
     Issued : 2009-07-08 23:00:00
       Bugs : 509125 - None
            : 509375 - None
       CVEs : CVE-2009-1890
            : CVE-2009-1891
Description : Important: httpd security update  \The Apache HTTP Server is a
            : popular Web server.  A denial of service flaw was
            : found in the Apache mod_proxy module when it was
            : used as a reverse proxy. A remote attacker could
            : use this flaw to force a proxy process to consume
            : large amounts of CPU time. (CVE-2009-1890)  A
            : denial of service flaw was found in the Apache
            : mod_deflate module. This module continued to
            : compress large files until compression was
            : complete, even if the network connection that
            : requested the content was closed before
            : compression completed. This would cause
            : mod_deflate to consume large amounts of CPU if
            : mod_deflate was enabled for a large file.
            : (CVE-2009-1891)  All httpd users should upgrade to
            : these updated packages, which contain backported
            : patches to correct these issues. After installing
            : the updated packages, the httpd daemon must be
            : restarted for the update to take effect.
      Files : mod_ssl-2.2.3-22.el5_3.2.x86_64.rpm
            : httpd-devel-2.2.3-22.el5_3.2.i386.rpm
            : httpd-2.2.3-22.el5_3.2.x86_64.rpm
            : httpd-devel-2.2.3-22.el5_3.2.x86_64.rpm
            : httpd-manual-2.2.3-22.el5_3.2.x86_64.rpm
            : mod_ssl-2.2.3-22.el5_3.2.i386.rpm
            : httpd-2.2.3-22.el5_3.2.i386.rpm
            : httpd-manual-2.2.3-22.el5_3.2.i386.rpm
info-security done


不防再给大家一个实例,如果我们想列出关于Bugzilla 3595、CVE #CVE-2009-1890和建议RHSA-2009:1148-1的清单,可以使用下面的命令:
  1. # yum --bz 3595 --cve CVE-2009-1890 --advisory RHSA-2009:1148-1 info updates
复制代码
最后,大家最关心的问题,如何一次性安装系统安全更新呢?呵呵,也是一个命令:
  1. # yum update --security
复制代码


0 0