北京SEO

linux下yum upgrade、yum update有什么区别?

2019/10/10/17:44:56  阅读:1759  来源:谷歌SEO算法  标签: 百度细雨算法

yum upgrade、yum update在linux中都可以用更新新软件安装包或升级软件了,那么这yum upgrade、yum update有什么区别呢?下面我们就一起来看看吧.

在网上看到有人如下总结:

yum -y update

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

yum -y upgrade

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

测试一下所谓yum upgrade于yum update的区别:

基本信息:

  1. [root@localhost~]#uname-a
  2. Linuxlocalhost.localdomain2.6.32-358.el6.x86_64#1SMPFriFeb2200:31:26UTC2013x86_64x86_64x86_64GNU/Linux
  3. [root@localhost~]#cat/etc/redhat-release
  4. CentOSrelease6.4(Final)
  5. manyum:
  6. --obsoletes:Thisoptiononlyhasaffectforanupdate,itenablesyum´sobsoletesprocessinglogic.Formoreinformationseetheupdatecommandabove.
  7. ConfigurationOption:obsoletes
  8. upgrade:Isthesameastheupdatecommandwiththe--obsoletesflagset.Seeupdateformoredetails.
  9. update:Ifrunwithoutanypackages,updatewillupdateeverycurrentlyinstalledpackage.Ifoneormorepackagesorpackageglobsarespecified,Yumwillonlyupdatethelistedpackages.Whileupdatingpackages,yumwillensurethatalldependenciesaresatisfied.(SeeSpecifyingpackagenamesformoreinformation)
  10. Ifthepackagesorglobsspecifiedmatchtopackageswhicharenotcurrentlyinstalledthenupdatewillnotinstallthem.updateoperatesongroups,files,providesandfilelistsjustlikethe"install"command.
  11. Ifthemainobsoletesconfigureoptionistrue(default)orthe--obsoletesflagispresentyumwillincludepackageobsoletesinitscalculations-thismakesitbetterfordistro-versionchanges,forexample:upgradingfromsomelinux8.0tosomelinux9.
  12. Notethat"update"worksoninstalledpackagesfirst,andonlyiftherearenomatchesdoesitlookforavailablepackages.Thedifferenceismostnoticeablewhenyoudo"updatefoo-1-2"whichwillactexactlyas"updatefoo"iffoo-1-2isinstalled.Youcanusethe"update-to"ifyou’dpreferthatnothinghappenintheabovecase.
  13. yumupgrade:
  14. Installed:
  15. kernel.x86_640:2.6.32-504.12.2.el6
  16. DependencyInstalled:
  17. libtasn1.x86_640:2.3-6.el6_5p11-kit.x86_640:0.18.5-2.el6_5.2p11-kit-trust.x86_640:0.18.5-2.el6_5.2
  18. pkgconfig.x86_641:0.23-9.1.el6shared-mime-info.x86_640:0.70-6.el6
  19. Updated:
  20. audit.x86_640:2.3.7-5.el6audit-libs.x86_640:2.3.7-5.el6
  21. authconfig.x86_640:6.1.12-19.el6bash.x86_640:4.1.2-29.el6
  22. binutils.x86_640:2.20.51.0.2-5.42.el6ca-certificates.noarch0:2014.1.98-65.1.el6
  23. centos-release.x86_640:6-6.el6.centos.12.2chkconfig.x86_640:1.3.49.3-2.el6_4.1
  24. coreutils.x86_640:8.4-37.el6coreutils-libs.x86_640:8.4-37.el6
  25. cpio.x86_640:2.10-12.el6_5cronie.x86_640:1.4.4-12.el6
  26. cronie-anacron.x86_640:1.4.4-12.el6cryptsetup-luks.x86_640:1.2.0-11.el6
  27. cryptsetup-luks-libs.x86_640:1.2.0-11.el6curl.x86_640:7.19.7-40.el6_6.4
  28. cyrus-sasl.x86_640:2.1.23-15.el6_6.1cyrus-sasl-lib.x86_640:2.1.23-15.el6_6.1
  29. db4.x86_640:4.7.25-18.el6_4db4-utils.x86_640:4.7.25-18.el6_4
  30. dbus-glib.x86_640:0.86-6.el6device-mapper.x86_640:1.02.90-2.el6_6.1
  31. device-mapper-event.x86_640:1.02.90-2.el6_6.1device-mapper-event-libs.x86_640:1.02.90-2.el6_6.1
  32. device-mapper-libs.x86_640:1.02.90-2.el6_6.1device-mapper-multipath.x86_640:0.4.9-80.el6_6.3
  33. device-mapper-multipath-libs.x86_640:0.4.9-80.el6_6.3device-mapper-persistent-data.x86_640:0.3.2-1.el6
  34. dhclient.x86_6412:4.1.1-43.P1.el6.centos.1dhcp-common.x86_6412:4.1.1-43.P1.el6.centos.1
  35. dracut.noarch0:004-356.el6_6.1dracut-kernel.noarch0:004-356.el6_6.1
  36. e2fsprogs.x86_640:1.41.12-21.el6e2fsprogs-libs.x86_640:1.41.12-21.el6
  37. efibootmgr.x86_640:0.5.4-12.el6elfutils-libelf.x86_640:0.158-3.2.el6
  38. ethtool.x86_642:3.5-5.el6file.x86_640:5.04-21.el6
  39. file-libs.x86_640:5.04-21.el6glib2.x86_640:2.28.8-4.el6
  40. gnupg2.x86_640:2.0.14-8.el6grep.x86_640:2.6.3-6.el6
  41. grub.x86_641:0.97-93.el6grubby.x86_640:7.0.15-7.el6
  42. gzip.x86_640:1.3.12-22.el6hwdata.noarch0:0.233-11.1.el6
  43. initscripts.x86_640:9.03.46-1.el6.centos.1iproute.x86_640:2.6.32-33.el6_6
  44. iptables.x86_640:1.4.7-14.el6iptables-ipv6.x86_640:1.4.7-14.el6
  45. iputils.x86_640:20071127-17.el6_4.2iscsi-initiator-utils.x86_640:6.2.0.873-13.el6
  46. kernel-firmware.noarch0:2.6.32-504.12.2.el6keyutils-libs.x86_640:1.4-5.el6
  47. kpartx.x86_640:0.4.9-80.el6_6.3krb5-libs.x86_640:1.10.3-33.el6
  48. less.x86_640:436-13.el6libblkid.x86_640:2.17.2-12.18.el6
  49. libcom_err.x86_640:1.41.12-21.el6libcurl.x86_640:7.19.7-40.el6_6.4
  50. libdrm.x86_640:2.4.52-4.el6libgcrypt.x86_640:1.4.5-11.el6_4
  51. libpciaccess.x86_640:0.13.3-0.1.el6libselinux.x86_640:2.0.94-5.8.el6
  52. libselinux-utils.x86_640:2.0.94-5.8.el6libss.x86_640:1.41.12-21.el6
  53. libssh2.x86_640:1.4.2-1.el6_6.1libudev.x86_640:147-2.57.el6
  54. libuuid.x86_640:2.17.2-12.18.el6libxml2.x86_640:2.7.6-17.el6_6.1
  55. logrotate.x86_640:3.7.8-17.el6lvm2.x86_640:2.02.111-2.el6_6.1
  56. lvm2-libs.x86_640:2.02.111-2.el6_6.1mdadm.x86_640:3.3-6.el6_6.1
  57. module-init-tools.x86_640:3.9-24.el6mysql-libs.x86_640:5.1.73-3.el6_5
  58. nspr.x86_640:4.10.6-1.el6_5nss.x86_640:3.16.2.3-3.el6_6
  59. nss-softokn.x86_640:3.14.3-22.el6_6nss-softokn-freebl.x86_640:3.14.3-22.el6_6
  60. nss-sysinit.x86_640:3.16.2.3-3.el6_6nss-tools.x86_640:3.16.2.3-3.el6_6
  61. nss-util.x86_640:3.16.2.3-2.el6_6openldap.x86_640:2.4.39-8.el6
  62. openssh.x86_640:5.3p1-104.el6_6.1openssh-clients.x86_640:5.3p1-104.el6_6.1
  63. openssh-server.x86_640:5.3p1-104.el6_6.1pam.x86_640:1.1.1-20.el6
  64. pciutils-libs.x86_640:3.1.10-4.el6plymouth.x86_640:0.8.3-27.el6.centos.1
  65. plymouth-core-libs.x86_640:0.8.3-27.el6.centos.1plymouth-scripts.x86_640:0.8.3-27.el6.centos.1
  66. policycoreutils.x86_640:2.0.83-19.47.el6_6.1postfix.x86_642:2.6.6-6.el6_5
  67. procps.x86_640:3.2.8-30.el6psmisc.x86_640:22.6-19.el6_5
  68. python.x86_640:2.6.6-52.el6python-libs.x86_640:2.6.6-52.el6
  69. python-urlgrabber.noarch0:3.9.1-9.el6rpm.x86_640:4.8.0-38.el6_6
  70. rpm-libs.x86_640:4.8.0-38.el6_6rpm-python.x86_640:4.8.0-38.el6_6
  71. rsyslog.x86_640:5.8.10-10.el6_6selinux-policy.noarch0:3.7.19-260.el6_6.2
  72. selinux-policy-targeted.noarch0:3.7.19-260.el6_6.2setup.noarch0:2.8.14-20.el6_4.1
  73. shadow-utils.x86_642:4.1.4.2-19.el6sudo.x86_640:1.8.6p3-15.el6
  74. system-config-firewall-base.noarch0:1.2.27-7.2.el6_6sysvinit-tools.x86_640:2.87-5.dsf.el6
  75. tzdata.noarch0:2015a-1.el6udev.x86_640:147-2.57.el6
  76. upstart.x86_640:0.6.5-13.el6_5.3util-linux-ng.x86_640:2.17.2-12.18.el6
  77. xfsprogs.x86_640:3.1.1-16.el6xz-libs.x86_640:4.999.9-0.5.beta.20091007git.el6
  78. yum.noarch0:3.2.29-60.el6.centosyum-plugin-fastestmirror.noarch0:1.1.30-30.el6
  79. Complete!
  80. [root@localhost~]#reboot
  81. [root@localhost~]#uname-a
  82. Linuxlocalhost.localdomain2.6.32-504.12.2.el6.x86_64#内核升级了!
  83. [root@localhost~]#cat/etc/redhat-release
  84. CentOSrelease6.6(Final)
  85. yumupdate:
  86. Installed:
  87. kernel.x86_640:2.6.32-504.12.2.el6
  88. DependencyInstalled:
  89. libtasn1.x86_640:2.3-6.el6_5p11-kit.x86_640:0.18.5-2.el6_5.2p11-kit-trust.x86_640:0.18.5-2.el6_5.2
  90. pkgconfig.x86_641:0.23-9.1.el6shared-mime-info.x86_640:0.70-6.el6
  91. Updated:
  92. audit.x86_640:2.3.7-5.el6audit-libs.x86_640:2.3.7-5.el6
  93. authconfig.x86_640:6.1.12-19.el6bash.x86_640:4.1.2-29.el6
  94. binutils.x86_640:2.20.51.0.2-5.42.el6ca-certificates.noarch0:2014.1.98-65.1.el6
  95. centos-release.x86_640:6-6.el6.centos.12.2chkconfig.x86_640:1.3.49.3-2.el6_4.1
  96. coreutils.x86_640:8.4-37.el6coreutils-libs.x86_640:8.4-37.el6
  97. cpio.x86_640:2.10-12.el6_5cronie.x86_640:1.4.4-12.el6
  98. cronie-anacron.x86_640:1.4.4-12.el6cryptsetup-luks.x86_640:1.2.0-11.el6
  99. cryptsetup-luks-libs.x86_640:1.2.0-11.el6curl.x86_640:7.19.7-40.el6_6.4
  100. cyrus-sasl.x86_640:2.1.23-15.el6_6.1cyrus-sasl-lib.x86_640:2.1.23-15.el6_6.1
  101. db4.x86_640:4.7.25-18.el6_4db4-utils.x86_640:4.7.25-18.el6_4
  102. dbus-glib.x86_640:0.86-6.el6device-mapper.x86_640:1.02.90-2.el6_6.1
  103. device-mapper-event.x86_640:1.02.90-2.el6_6.1device-mapper-event-libs.x86_640:1.02.90-2.el6_6.1
  104. device-mapper-libs.x86_640:1.02.90-2.el6_6.1device-mapper-multipath.x86_640:0.4.9-80.el6_6.3
  105. device-mapper-multipath-libs.x86_640:0.4.9-80.el6_6.3device-mapper-persistent-data.x86_640:0.3.2-1.el6
  106. dhclient.x86_6412:4.1.1-43.P1.el6.centos.1dhcp-common.x86_6412:4.1.1-43.P1.el6.centos.1
  107. dracut.noarch0:004-356.el6_6.1dracut-kernel.noarch0:004-356.el6_6.1
  108. e2fsprogs.x86_640:1.41.12-21.el6e2fsprogs-libs.x86_640:1.41.12-21.el6
  109. efibootmgr.x86_640:0.5.4-12.el6elfutils-libelf.x86_640:0.158-3.2.el6
  110. ethtool.x86_642:3.5-5.el6file.x86_640:5.04-21.el6
  111. file-libs.x86_640:5.04-21.el6glib2.x86_640:2.28.8-4.el6
  112. gnupg2.x86_640:2.0.14-8.el6grep.x86_640:2.6.3-6.el6
  113. grub.x86_641:0.97-93.el6grubby.x86_640:7.0.15-7.el6
  114. gzip.x86_640:1.3.12-22.el6hwdata.noarch0:0.233-11.1.el6
  115. initscripts.x86_640:9.03.46-1.el6.centos.1iproute.x86_640:2.6.32-33.el6_6
  116. iptables.x86_640:1.4.7-14.el6iptables-ipv6.x86_640:1.4.7-14.el6
  117. iputils.x86_640:20071127-17.el6_4.2iscsi-initiator-utils.x86_640:6.2.0.873-13.el6
  118. kernel-firmware.noarch0:2.6.32-504.12.2.el6keyutils-libs.x86_640:1.4-5.el6
  119. kpartx.x86_640:0.4.9-80.el6_6.3krb5-libs.x86_640:1.10.3-33.el6
  120. less.x86_640:436-13.el6libblkid.x86_640:2.17.2-12.18.el6
  121. libcom_err.x86_640:1.41.12-21.el6libcurl.x86_640:7.19.7-40.el6_6.4
  122. libdrm.x86_640:2.4.52-4.el6libgcrypt.x86_640:1.4.5-11.el6_4
  123. libpciaccess.x86_640:0.13.3-0.1.el6libselinux.x86_640:2.0.94-5.8.el6
  124. libselinux-utils.x86_640:2.0.94-5.8.el6libss.x86_640:1.41.12-21.el6
  125. libssh2.x86_640:1.4.2-1.el6_6.1libudev.x86_640:147-2.57.el6
  126. libuuid.x86_640:2.17.2-12.18.el6libxml2.x86_640:2.7.6-17.el6_6.1
  127. logrotate.x86_640:3.7.8-17.el6lvm2.x86_640:2.02.111-2.el6_6.1
  128. lvm2-libs.x86_640:2.02.111-2.el6_6.1mdadm.x86_640:3.3-6.el6_6.1
  129. module-init-tools.x86_640:3.9-24.el6mysql-libs.x86_640:5.1.73-3.el6_5
  130. nspr.x86_640:4.10.6-1.el6_5nss.x86_640:3.16.2.3-3.el6_6
  131. nss-softokn.x86_640:3.14.3-22.el6_6nss-softokn-freebl.x86_640:3.14.3-22.el6_6
  132. nss-sysinit.x86_640:3.16.2.3-3.el6_6nss-tools.x86_640:3.16.2.3-3.el6_6
  133. nss-util.x86_640:3.16.2.3-2.el6_6openldap.x86_640:2.4.39-8.el6
  134. openssh.x86_640:5.3p1-104.el6_6.1openssh-clients.x86_640:5.3p1-104.el6_6.1
  135. openssh-server.x86_640:5.3p1-104.el6_6.1pam.x86_640:1.1.1-20.el6
  136. pciutils-libs.x86_640:3.1.10-4.el6plymouth.x86_640:0.8.3-27.el6.centos.1
  137. plymouth-core-libs.x86_640:0.8.3-27.el6.centos.1plymouth-scripts.x86_640:0.8.3-27.el6.centos.1
  138. policycoreutils.x86_640:2.0.83-19.47.el6_6.1postfix.x86_642:2.6.6-6.el6_5
  139. procps.x86_640:3.2.8-30.el6psmisc.x86_640:22.6-19.el6_5
  140. python.x86_640:2.6.6-52.el6python-libs.x86_640:2.6.6-52.el6
  141. python-urlgrabber.noarch0:3.9.1-9.el6rpm.x86_640:4.8.0-38.el6_6
  142. rpm-libs.x86_640:4.8.0-38.el6_6rpm-python.x86_640:4.8.0-38.el6_6
  143. rsyslog.x86_640:5.8.10-10.el6_6selinux-policy.noarch0:3.7.19-260.el6_6.2
  144. selinux-policy-targeted.noarch0:3.7.19-260.el6_6.2setup.noarch0:2.8.14-20.el6_4.1
  145. shadow-utils.x86_642:4.1.4.2-19.el6sudo.x86_640:1.8.6p3-15.el6
  146. system-config-firewall-base.noarch0:1.2.27-7.2.el6_6sysvinit-tools.x86_640:2.87-5.dsf.el6
  147. tzdata.noarch0:2015a-1.el6udev.x86_640:147-2.57.el6--phpfensi.com
  148. upstart.x86_640:0.6.5-13.el6_5.3util-linux-ng.x86_640:2.17.2-12.18.el6
  149. xfsprogs.x86_640:3.1.1-16.el6xz-libs.x86_640:4.999.9-0.5.beta.20091007git.el6
  150. yum.noarch0:3.2.29-60.el6.centosyum-plugin-fastestmirror.noarch0:1.1.30-30.el6
  151. Complete!
  152. [root@localhost~]#uname-a
  153. Linuxlocalhost.localdomain2.6.32-504.12.2.el6.x86_64#1SMPWedMar1122:03:14UTC2015x86_64x86_64x86_64GNU/Linux
  154. [root@localhost~]#cat/etc/redhat-release
  155. CentOSrelease6.6(Final)

结论:Centos6.4 升级到 Centos6.6 貌似 yum update 和 yum upgrade 均可.

广告内容

linux下yum upgrade、yum update有什么区别? linux下yum upgrade、yum update有什么区别? linux下yum upgrade、yum update有什么区别?

相关阅读

热门评论

精选文章

RMAN中catalog和nocatalog区别介绍 小技巧:为Linux下的文件分配多个权限 zimbra8.5.1安装第三方签名ssl证书的步骤 解决mysql不能远程连接数据库方法 windows服务器mysql增量备份批处理数据库 mysql中slow query log慢日志查询分析 JavaScript跨域问题总结 Linux下负载均衡软件LVS配置(VS/DR)教程 mysql中权限参数说明 MYSQL(错误1053)无法正常启动

SEO最新算法