测试一下所谓yum upgrade于yum update的区别:
基本信息:
0 1 2 3 |
[root@localhost ~]# uname -a Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [root@localhost ~]# cat /etc/redhat-release CentOS release 6.4 (Final) |
man yum:SourceByrd's Weblog-https://note.t4x.org/basic/upgrade-diff-update/
--obsoletes:This option only has affect for an update, it enables yum´s obsoletes processing logic. For more information see the update command above.
Configuration Option: obsoletes
upgrade:Is the same as the update command with the --obsoletes flag set. See update for more details.
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 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.SourceByrd's Weblog-https://note.t4x.org/basic/upgrade-diff-update/
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
Installed: kernel.x86_64 0:2.6.32-504.12.2.el6 Dependency Installed: libtasn1.x86_64 0:2.3-6.el6_5 p11-kit.x86_64 0:0.18.5-2.el6_5.2 p11-kit-trust.x86_64 0:0.18.5-2.el6_5.2 pkgconfig.x86_64 1:0.23-9.1.el6 shared-mime-info.x86_64 0:0.70-6.el6 Updated: audit.x86_64 0:2.3.7-5.el6 audit-libs.x86_64 0:2.3.7-5.el6 authconfig.x86_64 0:6.1.12-19.el6 bash.x86_64 0:4.1.2-29.el6 binutils.x86_64 0:2.20.51.0.2-5.42.el6 ca-certificates.noarch 0:2014.1.98-65.1.el6 centos-release.x86_64 0:6-6.el6.centos.12.2 chkconfig.x86_64 0:1.3.49.3-2.el6_4.1 coreutils.x86_64 0:8.4-37.el6 coreutils-libs.x86_64 0:8.4-37.el6 cpio.x86_64 0:2.10-12.el6_5 cronie.x86_64 0:1.4.4-12.el6 cronie-anacron.x86_64 0:1.4.4-12.el6 cryptsetup-luks.x86_64 0:1.2.0-11.el6 cryptsetup-luks-libs.x86_64 0:1.2.0-11.el6 curl.x86_64 0:7.19.7-40.el6_6.4 cyrus-sasl.x86_64 0:2.1.23-15.el6_6.1 cyrus-sasl-lib.x86_64 0:2.1.23-15.el6_6.1 db4.x86_64 0:4.7.25-18.el6_4 db4-utils.x86_64 0:4.7.25-18.el6_4 dbus-glib.x86_64 0:0.86-6.el6 device-mapper.x86_64 0:1.02.90-2.el6_6.1 device-mapper-event.x86_64 0:1.02.90-2.el6_6.1 device-mapper-event-libs.x86_64 0:1.02.90-2.el6_6.1 device-mapper-libs.x86_64 0:1.02.90-2.el6_6.1 device-mapper-multipath.x86_64 0:0.4.9-80.el6_6.3 device-mapper-multipath-libs.x86_64 0:0.4.9-80.el6_6.3 device-mapper-persistent-data.x86_64 0:0.3.2-1.el6 dhclient.x86_64 12:4.1.1-43.P1.el6.centos.1 dhcp-common.x86_64 12:4.1.1-43.P1.el6.centos.1 dracut.noarch 0:004-356.el6_6.1 dracut-kernel.noarch 0:004-356.el6_6.1 e2fsprogs.x86_64 0:1.41.12-21.el6 e2fsprogs-libs.x86_64 0:1.41.12-21.el6 efibootmgr.x86_64 0:0.5.4-12.el6 elfutils-libelf.x86_64 0:0.158-3.2.el6 ethtool.x86_64 2:3.5-5.el6 file.x86_64 0:5.04-21.el6 file-libs.x86_64 0:5.04-21.el6 glib2.x86_64 0:2.28.8-4.el6 gnupg2.x86_64 0:2.0.14-8.el6 grep.x86_64 0:2.6.3-6.el6 grub.x86_64 1:0.97-93.el6 grubby.x86_64 0:7.0.15-7.el6 gzip.x86_64 0:1.3.12-22.el6 hwdata.noarch 0:0.233-11.1.el6 initscripts.x86_64 0:9.03.46-1.el6.centos.1 iproute.x86_64 0:2.6.32-33.el6_6 iptables.x86_64 0:1.4.7-14.el6 iptables-ipv6.x86_64 0:1.4.7-14.el6 iputils.x86_64 0:20071127-17.el6_4.2 iscsi-initiator-utils.x86_64 0:6.2.0.873-13.el6 kernel-firmware.noarch 0:2.6.32-504.12.2.el6 keyutils-libs.x86_64 0:1.4-5.el6 kpartx.x86_64 0:0.4.9-80.el6_6.3 krb5-libs.x86_64 0:1.10.3-33.el6 less.x86_64 0:436-13.el6 libblkid.x86_64 0:2.17.2-12.18.el6 libcom_err.x86_64 0:1.41.12-21.el6 libcurl.x86_64 0:7.19.7-40.el6_6.4 libdrm.x86_64 0:2.4.52-4.el6 libgcrypt.x86_64 0:1.4.5-11.el6_4 libpciaccess.x86_64 0:0.13.3-0.1.el6 libselinux.x86_64 0:2.0.94-5.8.el6 libselinux-utils.x86_64 0:2.0.94-5.8.el6 libss.x86_64 0:1.41.12-21.el6 libssh2.x86_64 0:1.4.2-1.el6_6.1 libudev.x86_64 0:147-2.57.el6 libuuid.x86_64 0:2.17.2-12.18.el6 libxml2.x86_64 0:2.7.6-17.el6_6.1 logrotate.x86_64 0:3.7.8-17.el6 lvm2.x86_64 0:2.02.111-2.el6_6.1 lvm2-libs.x86_64 0:2.02.111-2.el6_6.1 mdadm.x86_64 0:3.3-6.el6_6.1 module-init-tools.x86_64 0:3.9-24.el6 mysql-libs.x86_64 0:5.1.73-3.el6_5 nspr.x86_64 0:4.10.6-1.el6_5 nss.x86_64 0:3.16.2.3-3.el6_6 nss-softokn.x86_64 0:3.14.3-22.el6_6 nss-softokn-freebl.x86_64 0:3.14.3-22.el6_6 nss-sysinit.x86_64 0:3.16.2.3-3.el6_6 nss-tools.x86_64 0:3.16.2.3-3.el6_6 nss-util.x86_64 0:3.16.2.3-2.el6_6 openldap.x86_64 0:2.4.39-8.el6 openssh.x86_64 0:5.3p1-104.el6_6.1 openssh-clients.x86_64 0:5.3p1-104.el6_6.1 openssh-server.x86_64 0:5.3p1-104.el6_6.1 pam.x86_64 0:1.1.1-20.el6 pciutils-libs.x86_64 0:3.1.10-4.el6 plymouth.x86_64 0:0.8.3-27.el6.centos.1 plymouth-core-libs.x86_64 0:0.8.3-27.el6.centos.1 plymouth-scripts.x86_64 0:0.8.3-27.el6.centos.1 policycoreutils.x86_64 0:2.0.83-19.47.el6_6.1 postfix.x86_64 2:2.6.6-6.el6_5 procps.x86_64 0:3.2.8-30.el6 psmisc.x86_64 0:22.6-19.el6_5 python.x86_64 0:2.6.6-52.el6 python-libs.x86_64 0:2.6.6-52.el6 python-urlgrabber.noarch 0:3.9.1-9.el6 rpm.x86_64 0:4.8.0-38.el6_6 rpm-libs.x86_64 0:4.8.0-38.el6_6 rpm-python.x86_64 0:4.8.0-38.el6_6 rsyslog.x86_64 0:5.8.10-10.el6_6 selinux-policy.noarch 0:3.7.19-260.el6_6.2 selinux-policy-targeted.noarch 0:3.7.19-260.el6_6.2 setup.noarch 0:2.8.14-20.el6_4.1 shadow-utils.x86_64 2:4.1.4.2-19.el6 sudo.x86_64 0:1.8.6p3-15.el6 system-config-firewall-base.noarch 0:1.2.27-7.2.el6_6 sysvinit-tools.x86_64 0:2.87-5.dsf.el6 tzdata.noarch 0:2015a-1.el6 udev.x86_64 0:147-2.57.el6 upstart.x86_64 0:0.6.5-13.el6_5.3 util-linux-ng.x86_64 0:2.17.2-12.18.el6 xfsprogs.x86_64 0:3.1.1-16.el6 xz-libs.x86_64 0:4.999.9-0.5.beta.20091007git.el6 yum.noarch 0:3.2.29-60.el6.centos yum-plugin-fastestmirror.noarch 0:1.1.30-30.el6 Complete! [root@localhost ~]# reboot [root@localhost ~]# uname -a Linux localhost.localdomain 2.6.32-504.12.2.el6.x86_64 #内核升级了! [root@localhost ~]# cat /etc/redhat-release CentOS release 6.6 (Final) |
yum update:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
Installed: kernel.x86_64 0:2.6.32-504.12.2.el6 Dependency Installed: libtasn1.x86_64 0:2.3-6.el6_5 p11-kit.x86_64 0:0.18.5-2.el6_5.2 p11-kit-trust.x86_64 0:0.18.5-2.el6_5.2 pkgconfig.x86_64 1:0.23-9.1.el6 shared-mime-info.x86_64 0:0.70-6.el6 Updated: audit.x86_64 0:2.3.7-5.el6 audit-libs.x86_64 0:2.3.7-5.el6 authconfig.x86_64 0:6.1.12-19.el6 bash.x86_64 0:4.1.2-29.el6 binutils.x86_64 0:2.20.51.0.2-5.42.el6 ca-certificates.noarch 0:2014.1.98-65.1.el6 centos-release.x86_64 0:6-6.el6.centos.12.2 chkconfig.x86_64 0:1.3.49.3-2.el6_4.1 coreutils.x86_64 0:8.4-37.el6 coreutils-libs.x86_64 0:8.4-37.el6 cpio.x86_64 0:2.10-12.el6_5 cronie.x86_64 0:1.4.4-12.el6 cronie-anacron.x86_64 0:1.4.4-12.el6 cryptsetup-luks.x86_64 0:1.2.0-11.el6 cryptsetup-luks-libs.x86_64 0:1.2.0-11.el6 curl.x86_64 0:7.19.7-40.el6_6.4 cyrus-sasl.x86_64 0:2.1.23-15.el6_6.1 cyrus-sasl-lib.x86_64 0:2.1.23-15.el6_6.1 db4.x86_64 0:4.7.25-18.el6_4 db4-utils.x86_64 0:4.7.25-18.el6_4 dbus-glib.x86_64 0:0.86-6.el6 device-mapper.x86_64 0:1.02.90-2.el6_6.1 device-mapper-event.x86_64 0:1.02.90-2.el6_6.1 device-mapper-event-libs.x86_64 0:1.02.90-2.el6_6.1 device-mapper-libs.x86_64 0:1.02.90-2.el6_6.1 device-mapper-multipath.x86_64 0:0.4.9-80.el6_6.3 device-mapper-multipath-libs.x86_64 0:0.4.9-80.el6_6.3 device-mapper-persistent-data.x86_64 0:0.3.2-1.el6 dhclient.x86_64 12:4.1.1-43.P1.el6.centos.1 dhcp-common.x86_64 12:4.1.1-43.P1.el6.centos.1 dracut.noarch 0:004-356.el6_6.1 dracut-kernel.noarch 0:004-356.el6_6.1 e2fsprogs.x86_64 0:1.41.12-21.el6 e2fsprogs-libs.x86_64 0:1.41.12-21.el6 efibootmgr.x86_64 0:0.5.4-12.el6 elfutils-libelf.x86_64 0:0.158-3.2.el6 ethtool.x86_64 2:3.5-5.el6 file.x86_64 0:5.04-21.el6 file-libs.x86_64 0:5.04-21.el6 glib2.x86_64 0:2.28.8-4.el6 gnupg2.x86_64 0:2.0.14-8.el6 grep.x86_64 0:2.6.3-6.el6 grub.x86_64 1:0.97-93.el6 grubby.x86_64 0:7.0.15-7.el6 gzip.x86_64 0:1.3.12-22.el6 hwdata.noarch 0:0.233-11.1.el6 initscripts.x86_64 0:9.03.46-1.el6.centos.1 iproute.x86_64 0:2.6.32-33.el6_6 iptables.x86_64 0:1.4.7-14.el6 iptables-ipv6.x86_64 0:1.4.7-14.el6 iputils.x86_64 0:20071127-17.el6_4.2 iscsi-initiator-utils.x86_64 0:6.2.0.873-13.el6 kernel-firmware.noarch 0:2.6.32-504.12.2.el6 keyutils-libs.x86_64 0:1.4-5.el6 kpartx.x86_64 0:0.4.9-80.el6_6.3 krb5-libs.x86_64 0:1.10.3-33.el6 less.x86_64 0:436-13.el6 libblkid.x86_64 0:2.17.2-12.18.el6 libcom_err.x86_64 0:1.41.12-21.el6 libcurl.x86_64 0:7.19.7-40.el6_6.4 libdrm.x86_64 0:2.4.52-4.el6 libgcrypt.x86_64 0:1.4.5-11.el6_4 libpciaccess.x86_64 0:0.13.3-0.1.el6 libselinux.x86_64 0:2.0.94-5.8.el6 libselinux-utils.x86_64 0:2.0.94-5.8.el6 libss.x86_64 0:1.41.12-21.el6 libssh2.x86_64 0:1.4.2-1.el6_6.1 libudev.x86_64 0:147-2.57.el6 libuuid.x86_64 0:2.17.2-12.18.el6 libxml2.x86_64 0:2.7.6-17.el6_6.1 logrotate.x86_64 0:3.7.8-17.el6 lvm2.x86_64 0:2.02.111-2.el6_6.1 lvm2-libs.x86_64 0:2.02.111-2.el6_6.1 mdadm.x86_64 0:3.3-6.el6_6.1 module-init-tools.x86_64 0:3.9-24.el6 mysql-libs.x86_64 0:5.1.73-3.el6_5 nspr.x86_64 0:4.10.6-1.el6_5 nss.x86_64 0:3.16.2.3-3.el6_6 nss-softokn.x86_64 0:3.14.3-22.el6_6 nss-softokn-freebl.x86_64 0:3.14.3-22.el6_6 nss-sysinit.x86_64 0:3.16.2.3-3.el6_6 nss-tools.x86_64 0:3.16.2.3-3.el6_6 nss-util.x86_64 0:3.16.2.3-2.el6_6 openldap.x86_64 0:2.4.39-8.el6 openssh.x86_64 0:5.3p1-104.el6_6.1 openssh-clients.x86_64 0:5.3p1-104.el6_6.1 openssh-server.x86_64 0:5.3p1-104.el6_6.1 pam.x86_64 0:1.1.1-20.el6 pciutils-libs.x86_64 0:3.1.10-4.el6 plymouth.x86_64 0:0.8.3-27.el6.centos.1 plymouth-core-libs.x86_64 0:0.8.3-27.el6.centos.1 plymouth-scripts.x86_64 0:0.8.3-27.el6.centos.1 policycoreutils.x86_64 0:2.0.83-19.47.el6_6.1 postfix.x86_64 2:2.6.6-6.el6_5 procps.x86_64 0:3.2.8-30.el6 psmisc.x86_64 0:22.6-19.el6_5 python.x86_64 0:2.6.6-52.el6 python-libs.x86_64 0:2.6.6-52.el6 python-urlgrabber.noarch 0:3.9.1-9.el6 rpm.x86_64 0:4.8.0-38.el6_6 rpm-libs.x86_64 0:4.8.0-38.el6_6 rpm-python.x86_64 0:4.8.0-38.el6_6 rsyslog.x86_64 0:5.8.10-10.el6_6 selinux-policy.noarch 0:3.7.19-260.el6_6.2 selinux-policy-targeted.noarch 0:3.7.19-260.el6_6.2 setup.noarch 0:2.8.14-20.el6_4.1 shadow-utils.x86_64 2:4.1.4.2-19.el6 sudo.x86_64 0:1.8.6p3-15.el6 system-config-firewall-base.noarch 0:1.2.27-7.2.el6_6 sysvinit-tools.x86_64 0:2.87-5.dsf.el6 tzdata.noarch 0:2015a-1.el6 udev.x86_64 0:147-2.57.el6 upstart.x86_64 0:0.6.5-13.el6_5.3 util-linux-ng.x86_64 0:2.17.2-12.18.el6 xfsprogs.x86_64 0:3.1.1-16.el6 xz-libs.x86_64 0:4.999.9-0.5.beta.20091007git.el6 yum.noarch 0:3.2.29-60.el6.centos yum-plugin-fastestmirror.noarch 0:1.1.30-30.el6 Complete! [root@localhost ~]# uname -a Linux localhost.localdomain 2.6.32-504.12.2.el6.x86_64 #1 SMP Wed Mar 11 22:03:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@localhost ~]# cat /etc/redhat-release CentOS release 6.6 (Final) |
结论:Centos6.4 升级到 Centos6.6 貌似 yum update 和 yum upgrade 均可!SourceByrd's Weblog-https://note.t4x.org/basic/upgrade-diff-update/ SourceByrd's Weblog-https://note.t4x.org/basic/upgrade-diff-update/