CentOS Source Upgrade Kernel method
Recently in the research Docker, need to upgrade the kernel, below the way to upgrade the kernel.
1. Download kernel source
Download URL for https://www.kernel.org/I use for version 3.10 download address for
Https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.12.44.tar.xz
Download command:
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-
3.12.44.tar.xz
2. Extract source code
# TAR-XVF LINUX-3.12.44.TAR.XZ
# CD LINUX-3.12.44.TAR.XZ
3. Update system and install dependent software
# Yum Update
# Yum Upgrade
# yum Groupinstall Development Tools
# yum Install Ncurses-develqt-develhmaccalc zlib-devel binutils-devel
Elfutils-libelf-devel
4. Copy the current kernel configuration file to the current directory
Use the following command to view the kernel version
# Uname-r
3.10.0-229.1.2.el7.x86_64
Copy the corresponding kernel configuration file to the current directory
#cp/boot/config-3.10.0-229.1.2.el7.x86_64. config
The kernel version behind/boot/config-is the kernel version you just queried.
centos6.5 The default version is 2.6 Centos7 version is 3.10
5. Using the current kernel configuration
# sh-c ' Yes ' | Make Oldconfig ' #centos6中使用这个命令
# sh-c ' Y ' | Make Oldconfig ' #centos7中使用这个命令
6. Compile and install
# Make Bzimage
# Make Modules
# Make Modules_install
# make Install
Compiling the installation process may be slow please wait patiently
7. Modify Grub Modification Order
# vim/etc/grub.conf
Find the location of your new installation kernel, usually the first one, if the first one, set default = 0
Centos7 do not need to modify default to first boot entry
8. Restart the computer
# reboot