用yum升级内核

来源:http://blog.sina.com.cn/s/blog_537d1adc0100bndr.html
比如我们用的机器是单处理器的X86机,想看一下是否有新内核可用。所以咱们试一下下面的这个。看是否已经有了新内核可以升级的;

[root@localhost beinan]# yum info kernel.i686
[root@localhost beinan]# yum info kernel.i686
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Installed Packages
Name : kernel
Arch : i686
Version: 2.6.11
Release: 1.1369_FC4
Size : 37 M
Repo : installed
Summary: Linux 内核(Linux 操作系统的核心)。
Description:
kernel 软件包包含 Linux 内核 (vmlinuz),Red Hat Linux
操作系统的核心。内核处理操作系统的基本功能:
分配 内存、处理分配、设备的输入和输出等等。
Available Packages
Name : kernel
Arch : i686
Version: 2.6.12
Release: 1.1398_FC4
Size : 14 M
Repo : updates-released
Summary: The Linux kernel (the core of the Linux operating system)
Description:
The kernel package contains the Linux kernel (vmlinuz), the core of any
Linux operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc.

通过上面的信息,我们可以看到 2.6.11的是已经安装了,因为已经显示的是Repo : installed ,下面还有一个Version: 2.6.12 ,告诉我们是Repo : updates-released,看来这个是升级用的了。

所以是否升级就看我们的了。

[root@localhost beinan]# yum update kernel

升级内核全景如下:

[root@localhost beinan]# yum update kernel
Setting up Upgrade Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
freshrpms 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel to pack into transaction set.
kernel-2.6.12-1.1398_FC4. 100% |=========================| 174 kB 00:18
---> Package kernel.i686 0:2.6.12-1.1398_FC4 set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel i686 2.6.12-1.1398_FC4 updates-released 14 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 14 M
Is this ok [y/N]:

是不是升级,只需要在 Is this ok [y/N]:行的后面输入y或者N;y是yes,就是点头同意的意思;N就是摇头No的意思。