Rotten mud: centos6 yum kernel upgrade, centos6yum
This document consistsIlanniwebProviding friendship sponsorship, first launchedThe world
For more articles, follow my ilanniweb
I haven't written any articles for a long time recently. Today, because I need to install docker to learn about virtual containers, I need to upgrade the OS kernel. Currently, I am using centos 2.6 and the kernel version, as shown below:
Cat/etc/issue
Uname-r
Because docker requires more than 3.0 Kernel support, and 2.6 kernel can also be used, there may be uncontrollable problems at that time, so we need to upgrade the kernel version.
To upgrade the kernel OS to 3.1 or above, follow these steps.
1. Install the yum source of elrepo
To upgrade the kernel, you need to use the elrepo yum source. Before installing the yum source, you also need to import the elrepo key, as shown below:
Rpm -- import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Rpm-Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
After the elrepo key is installed, we will officially upgrade the kernel.
Ii. Upgrade the kernel
In yum elrepo, there are two types of kernels: ml and lt. Among them, ml (mainline) is the latest kernel version, and lt is a long-term supported kernel.
To install the ml kernel, run the following command:
Yum -- enablerepo = elrepo-kernel-y install kernel-ml
To install the lt kernel, run the following command:
Yum -- enablerepo = elrepo-kernel-y install kernel-lt
Here we install the lt kernel, as shown below:
The grub. conf file does not take effect immediately after the kernel is upgraded.
3. Modify the grub. conf file
After the kernel is upgraded, we need to modify the kernel startup sequence. The default boot sequence should be 1. After the upgrade, the kernel is inserted to the front as 0, as shown below:
Vim/etc/grub. conf
Default = 0
4. restart the system and view the system kernel
After the grub. conf file is modified, restart the system as follows:
Shutdown-r now
After the system is started, check the kernel version as follows:
Uname-r
We can easily see that centos6.5 has been upgraded to version 3.10.