首页 » 信息技术 »

CentOS yum update和upgrade的区别

2019年3月2日 / 43次阅读
Linux

update也会升级kernel,自己测试一下,在属于Y之前,看一看就知道了!!!

生产环境对软件版本和内核版本要求非常精确,别没事有事随便的在CentOS上进行yum upgrade或update操作!

不过,新买的VPS可以考虑做一次彻底的upgrade!

--------旧的分割线--------

yum upgrade:升级所有包同时也升级软件和系统内核

yum update:只升级所有包,不升级软件和系统内核

yum update比upgrade要安全一些。

最好是先用yum check-update看看,然后一个一个的按需yum update。

 

这是从man yum中提取出来的update和upgrade的解释:

update

If run without any packages, update will update every currently installed package. If one
or more packages or package globs are specified, Yum will only update the listed packages.
While updating packages, yum will ensure that all dependencies are satisfied. (See Specify‐
ing package names for more information) If the packages or globs specified match to packages
which are not currently installed then update will not install them. update operates on
groups, files, provides and filelists just like the "install" command.

If the main obsoletes configure option is true (default) or the --obsoletes flag is present
yum will include package obsoletes in its calculations - this makes it better for dis‐
tro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9.

Note that "update" works on installed packages first, and only if there are no matches does
it look for available packages. The difference is most noticeable when you do "update
foo-1-2" which will act exactly as "update foo" if foo-1-2 is installed. You can use the
"update-to" if you'd prefer that nothing happen in the above case.

upgrade

Is the same as the update command with the --obsoletes flag set. See update for more
details.

本文链接:https://www.maixj.net/ict/yum-update-upgrade-20386

相关文章

留言区

《CentOS yum update和upgrade的区别》有2条留言

  • 麦新杰

    update也会升级kernel,自己测试一下,在属于Y之前,看一看就知道了 []

    • 麦新杰

      kernel如果升级了,需要reboot。 []


前一篇:
后一篇:

栏目精选

云上小悟,麦新杰的独立博客

Ctrl+D 收藏本页

栏目


©Copyright 麦新杰 Since 2014 云上小悟独立博客版权所有 备案号:苏ICP备14045477号-1。云上小悟网站部分内容来源于网络,转载目的是为了整合信息,收藏学习,服务大家,有些转载内容也难以判断是否有侵权问题,如果侵犯了您的权益,请及时联系站长,我会立即删除。

网站二维码
go to top