zzx@ubuntu:~$ cat /etc/issue
Ubuntu 12.04.1 LTS
l
zzx@ubuntu:~$ uname -a
Linux ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
upgrade只是简单的更新包,不管这些依赖,它不和添加包,或是删除包。而dist-upgrade可以根据依赖关系的变化,添加包,删除包。
一般在运行upgrade或dist-upgrade之间,要运行update.
apt-get dist-upgrade 这个是只升级内核,,别的不升级
yun -y update后内核被升级
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@localhost ~]# yum -y upgrade #upgrade不升级内核 会升级版本号
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /proc/version
Linux version 3.10.0-229.1.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Fri Mar 27 03:04:26 UTC 2015
yum -y update
升级所有包同时也升级软件和系统内核
yum -y upgrade 实际测试内核和版本号都被升级了
只升级所有包,不升级软件和系统内核 会安装少量的依赖包
CentOS使用yum update更新时不升级内核的方法
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# yum --exclude=kernel* update 后
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
重启后查
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# yum check-update #列出可升级的内核