在Linux系统下,你知道如何在不实际下载软件包的情况下执行完整的系统更新测试吗?如果可以进行虚拟更新测试,将会避免系统更新过程中出现的错误或问题。
解决方案
在下面的yum命令中,yum将执行整个更新事务,但是,它将跳过新包安装更新,并且旧包也不会被删除。它仅仅是虚拟更新。
[root@shizhanxia.com ~]# yum update -y --setopt tsflags=test Loaded plugins: product-id, search-disabled-repos Resolving Dependencies --> Running transaction check ---> Package dhclient.x86_64 12:4.2.5-58.el7_4.1 will be updated ---> Package dhclient.x86_64 12:4.2.5-58.el7_4.3 will be an update ---> Package dhcp-common.x86_64 12:4.2.5-58.el7_4.1 will be updated ---> Package dhcp-common.x86_64 12:4.2.5-58.el7_4.3 will be an update ---> Package dhcp-libs.x86_64 12:4.2.5-58.el7_4.1 will be updated ---> Package dhcp-libs.x86_64 12:4.2.5-58.el7_4.3 will be an update --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================= Updating: dhclient x86_64 12:4.2.5-58.el7_4.3 rhel-7-server-rpms 282 k dhcp-common x86_64 12:4.2.5-58.el7_4.3 rhel-7-server-rpms 174 k dhcp-libs x86_64 12:4.2.5-58.el7_4.3 rhel-7-server-rpms 130 k Transaction Summary ============================================================================================================================================================================= Upgrade 3 Packages Total size: 586 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Updated: dhclient.x86_64 12:4.2.5-58.el7_4.3 dhcp-common.x86_64 12:4.2.5-58.el7_4.3 dhcp-libs.x86_64 12:4.2.5-58.el7_4.3 Complete! [/content_hide]
原创文章,作者:保哥,如若转载,请注明出处:https://www.shizhanxia.com/1183.html