Yum is popular package management tools between rpm
based distributions. In this tutorial we will simply look how update system packages for different distributions like Fedora, CentOS and RHEL .
Yum是基于rpm
的发行版之间流行的软件包管理工具。 在本教程中,我们将简单地了解如何针对Fedora,CentOS和RHEL等不同发行版更新系统软件包。
列出已安装的软件包 (List Installed Packages)
Before installing any update best step is listing installed packages. We can list install packages with yum list installed
command.
在安装任何更新之前,最好的步骤是列出已安装的软件包。 我们可以使用yum list installed
命令列出安装软件包。
$ sudo yum update -y
![](https://img-blog.csdnimg.cn/img_convert/8bade9eac955b1b69378d09b080cc951.png)
列出可用更新 (List Available Updates)
We should review upcoming update before installed them into the production servers. We can also use update testing servers to see effects of new updates. We can list available update with the following command.
在将更新安装到生产服务器之前,我们应该查看它们。 我们还可以使用更新测试服务器来查看新更新的效果。 我们可以使用以下命令列出可用的更新。
$ yum list updates
更新百胜餐饮套餐 (Update Yum Packages)
Now the most important part. We will install updates provided by official and third party yum repositories. We will simply use yum update
command to update all packages.
现在最重要的部分。 我们将安装官方和第三方yum存储库提供的更新。 我们将只使用yum update
命令来更新所有软件包。
$ yum update
无提示更新百胜餐饮套餐 (Update Yum Packages without Prompt)
Previous example will update our packages but will ask if we are sure to update packages. We can simply provide y
to this question. But there is more straightforward way where we will provide yes
with the -y
option to the yum update
command like below. This will skip confirmation step and directly install updates.
前面的示例将更新我们的软件包,但会询问我们是否确定要更新软件包。 我们可以简单地向这个问题提供y
。 但是,还有更多直接的方式,我们将提供yes
与-y
选项给yum update
像下面的命令。 这将跳过确认步骤,并直接安装更新。
$ yum update -y
检查特定的软件包更新 (Check Specific Package Update)
By default update
command will list or update all packages. We can strictly specify the packages we want to update or list like below. In this example we will only update package named ssh
.
默认情况下, update
命令将列出或更新所有软件包。 我们可以严格指定要更新或列出的软件包,如下所示。 在此示例中,我们将仅更新名为ssh
软件包。
$ yum update ssh
翻译自: https://www.poftut.com/update-fedora-centos-rhel-packages-yum-update/