For some special software, such as Docker need Linux kernel 3.1 to be very good support, then need to upgrade the kernel, and centos7 the default kernel seems to be 3.10.x, some low.
Method One:
View current system kernel version uname-r
1. Import Key
RPM--import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
2. Installation of Elrepo Yum source
RPM-UVH http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
3. Install the kernel
In the Yum Elrepo source, there is the latest version of the kernel. Direct yum installation can be.
Yum--enablerepo=elrepo-kernel Install Kernel-ml-devel kernel-ml-y
5. Set the system boot order
To view system Startup items:
Cat/boot/grub2/grub.cfg |grep Menuentry
You can find the latest version of the kernel, at which point you can set the latest version of the kernel to start by default:
Grub2-set-default ' CentOS Linux (4.8.5-1.el7.elrepo.x86_64) 7 (Core)
At this point, view the default-initiated system version grub2-editenv list:
Display as ' CentOS Linux (4.8.5-1.el7.elrepo.x86_64) 7 (Core) '
6. Reboot, after the reboot again see Uname-r method two:
1 Download Kernel source
Download URL for https://www.kernel.org/
wget xxx
2 extract and enter the source directory
3 Update the system and install the dependent software
#yum Update
#yum Upgrade
#yum Groups Install Development Tools
#yum Install ncurses-devel qt-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel
4 Copy the current kernel configuration file to the current directory
You should have performed the make menuconfig to customize the kernel configuration, build the configuration file. config; However, you can directly use the original kernel configuration of the system, that is, copy the configuration file in the/boot directory to the current directory.
cp/boot/config-2.6.32-431.11.2.el6.x86_64. config
5 using the current kernel configuration
#sh-C ' Yes ' | Make Oldconfig ' #centos 6
#sh-C ' Y ' | Make Oldconfig ' #centos 7
6 Compile Installation
#make Bzimage
#make Modules
#make Modules_install
#make Install
7 Setting System Boot order
To view system Startup items:
Cat/boot/grub2/grub.cfg |grep Menuentry
You can find the latest version of the kernel, at which point you can set the latest version of the kernel to start by default:
Grub2-set-default ' CentOS Linux (4.8.5-1.el7.elrepo.x86_64) 7 (Core)
At this point, view the default-initiated system version grub2-editenv list:
Display as ' CentOS Linux (4.8.5-1.el7.elrepo.x86_64) 7 (Core) '
8 reboot, after reboot, view Uname-r again
Note: The author only tried the first, the second kind of reader interested can try, theoretically can be success.