mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #14036 from wxy/20190604-Two-Methods-To-Check-Or-List-Installed-Security-Updates-on-Redhat-(RHEL)-And-CentOS-System
PRF&PUB:20190604 Two Methods To Check Or List Installed Security Updates on Redhat (RHEL) And CentOS System
This commit is contained in:
commit
742cd3c28a
@ -1,31 +1,25 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (geekpi)
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10960-1.html)
|
||||||
[#]: subject: (Two Methods To Check Or List Installed Security Updates on Redhat (RHEL) And CentOS System)
|
[#]: subject: (Two Methods To Check Or List Installed Security Updates on Redhat (RHEL) And CentOS System)
|
||||||
[#]: via: (https://www.2daygeek.com/check-installed-security-updates-on-redhat-rhel-and-centos-system/)
|
[#]: via: (https://www.2daygeek.com/check-installed-security-updates-on-redhat-rhel-and-centos-system/)
|
||||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||||
|
|
||||||
在 Redhat(RHEL) 和 CentOS 上检查或列出已安装的安全更新的两种方法
|
在 RHEL 和 CentOS 上检查或列出已安装的安全更新的两种方法
|
||||||
======
|
======
|
||||||
|
|
||||||
我们过去曾写过两篇关于这个主题的文章,每篇文章都是根据不同的要求发表的。
|
![](https://img.linux.net.cn/data/attachment/album/201906/11/100735bdnjzkkmjbxbttmm.jpg)
|
||||||
|
|
||||||
如果你想在开始之前浏览这些文章。
|
|
||||||
|
|
||||||
请通过以下链接:
|
|
||||||
|
|
||||||
* **[如何检查 Red Hat(RHEL)和 CentOS 上的可用安全更新?] [1] **
|
|
||||||
* **[在 Red Hat(RHEL)和 CentOS 上安装安全更新的四种方法?][2] **
|
|
||||||
|
|
||||||
|
我们过去曾写过两篇关于这个主题的文章,每篇文章都是根据不同的要求发表的。如果你想在开始之前浏览这些文章。请通过以下链接:
|
||||||
|
|
||||||
|
* [如何检查 RHEL 和 CentOS 上的可用安全更新?][1]
|
||||||
|
* [在 RHEL 和 CentOS 上安装安全更新的四种方法?][2]
|
||||||
|
|
||||||
这些文章与其他文章相互关联,因此,在深入研究之前,最好先阅读这些文章。
|
这些文章与其他文章相互关联,因此,在深入研究之前,最好先阅读这些文章。
|
||||||
|
|
||||||
在本文中,我们将向你展示如何检查已安装的安全更新。
|
在本文中,我们将向你展示如何检查已安装的安全更新。我会介绍两种方法,你可以选择最适合你的。
|
||||||
|
|
||||||
我会介绍两种方法,你可以选择最适合你的。
|
|
||||||
|
|
||||||
此外,我还添加了一个小的 shell 脚本,它为你提供已安装的安全包计数。
|
此外,我还添加了一个小的 shell 脚本,它为你提供已安装的安全包计数。
|
||||||
|
|
||||||
@ -46,14 +40,14 @@ RHSA-2017:2299 Moderate/Sec. NetworkManager-adsl-1:1.8.0-9.el7.x86_64
|
|||||||
RHSA-2015:2315 Moderate/Sec. NetworkManager-bluetooth-1:1.0.6-27.el7.x86_64
|
RHSA-2015:2315 Moderate/Sec. NetworkManager-bluetooth-1:1.0.6-27.el7.x86_64
|
||||||
```
|
```
|
||||||
|
|
||||||
要计算已安装的安全包的数量,请运行以下命令。
|
要计算已安装的安全包的数量,请运行以下命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
# yum updateinfo list security installed | wc -l
|
# yum updateinfo list security installed | wc -l
|
||||||
1046
|
1046
|
||||||
```
|
```
|
||||||
|
|
||||||
仅打印安装包列表。
|
仅打印安装包列表:
|
||||||
|
|
||||||
```
|
```
|
||||||
# yum updateinfo list security all | grep -w "i"
|
# yum updateinfo list security all | grep -w "i"
|
||||||
@ -73,7 +67,7 @@ i RHSA-2016:2581 Low/Sec. NetworkManager-config-server-1:1.4.0-12.el7.x86_
|
|||||||
i RHSA-2017:2299 Moderate/Sec. NetworkManager-config-server-1:1.8.0-9.el7.noarch
|
i RHSA-2017:2299 Moderate/Sec. NetworkManager-config-server-1:1.8.0-9.el7.noarch
|
||||||
```
|
```
|
||||||
|
|
||||||
要计算已安装的安全包的数量,请运行以下命令。
|
要计算已安装的安全包的数量,请运行以下命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
# yum updateinfo list security all | grep -w "i" | wc -l
|
# yum updateinfo list security all | grep -w "i" | wc -l
|
||||||
@ -82,7 +76,7 @@ i RHSA-2017:2299 Moderate/Sec. NetworkManager-config-server-1:1.8.0-9.el7.noarc
|
|||||||
|
|
||||||
或者,你可以检查指定包修复的漏洞列表。
|
或者,你可以检查指定包修复的漏洞列表。
|
||||||
|
|
||||||
在此例中,我们将检查 “openssh” 包中已修复的漏洞列表。
|
在此例中,我们将检查 “openssh” 包中已修复的漏洞列表:
|
||||||
|
|
||||||
```
|
```
|
||||||
# rpm -q --changelog openssh | grep -i CVE
|
# rpm -q --changelog openssh | grep -i CVE
|
||||||
@ -106,7 +100,7 @@ i RHSA-2017:2299 Moderate/Sec. NetworkManager-config-server-1:1.8.0-9.el7.noarc
|
|||||||
- use fork+exec instead of system in scp - CVE-2006-0225 (#168167)
|
- use fork+exec instead of system in scp - CVE-2006-0225 (#168167)
|
||||||
```
|
```
|
||||||
|
|
||||||
同样,你可以通过运行以下命令来检查相应的包中是否修复了指定的漏洞。
|
同样,你可以通过运行以下命令来检查相应的包中是否修复了指定的漏洞:
|
||||||
|
|
||||||
```
|
```
|
||||||
# rpm -q --changelog openssh | grep -i CVE-2016-3115
|
# rpm -q --changelog openssh | grep -i CVE-2016-3115
|
||||||
@ -160,11 +154,11 @@ via: https://www.2daygeek.com/check-installed-security-updates-on-redhat-rhel-an
|
|||||||
作者:[Magesh Maruthamuthu][a]
|
作者:[Magesh Maruthamuthu][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[geekpi](https://github.com/geekpi)
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
[a]: https://www.2daygeek.com/author/magesh/
|
[a]: https://www.2daygeek.com/author/magesh/
|
||||||
[b]: https://github.com/lujun9972
|
[b]: https://github.com/lujun9972
|
||||||
[1]: https://www.2daygeek.com/check-list-view-find-available-security-updates-on-redhat-rhel-centos-system/
|
[1]: https://linux.cn/article-10938-1.html
|
||||||
[2]: https://www.2daygeek.com/install-security-updates-on-redhat-rhel-centos-system/
|
[2]: https://www.2daygeek.com/install-security-updates-on-redhat-rhel-centos-system/
|
Loading…
Reference in New Issue
Block a user