加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

yum update upgrade区别

发布时间:2020-12-15 16:52:09 所属栏目:安全 来源:网络整理
导读:今天在做centos的内核升级测试,在使用源码升级的时候,在网上开到在升级内核之前先进行yum update、yumupgrade。这个两个到底有什么区别吗?网上搜索了一大把发现全是这样的说法: yum -y update 升级所有包,改变软件设置和系统设置,系统版本内核都升级 yu

今天在做centos的内核升级测试,在使用源码升级的时候,在网上开到在升级内核之前先进行yum update、yumupgrade。这个两个到底有什么区别吗?网上搜索了一大把发现全是这样的说法:

yum -y update

升级所有包,改变软件设置和系统设置,系统版本内核都升级


yum -y upgrade

升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变

而且还信誓旦旦的贴上了测试结果,真的是这样的吗???!!!我们还是看下man yum 是怎么说的吧!!!


update

If run without any packages,update will update every currently installed package. If one or more packages or pack-age globs are specified,Yum will only update the listed packages. While updating packages,yum will ensure that all dependencies are satisfied. (See Specifying 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 distro-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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读