1. View the kernel version
Uname-r
2. Download the compilation package required for the upgrade
Yum install-y vim
Yum install-y wget
Yum install-y gcc gcc-c++ xz
Yum install-y BC
Yum Install-y ncurses-devel
Yum install-y hmaccalc zlib-devel binutils-devel elfutils-libelf-devel
3. Download the kernel pack
Mkdir/usr/local/src/linux-kernel;cd/usr/local/src/linux-kernel
Website Https://www.kernel.org/pub/linux/kernel
Use wget next kernel version
4. Unzip the compilation
TAR-VXF unzip the good kernel file
CD to Folder
Select the modules required by the kernel in menu mode
Make Menuconfig
Save saved Exit exit
Modify
Vi/usr/src/linux-2.6.35.4/.config
Change #config_sysfs_deprecated_v2 is not set to Config_sysfs_deprecated_v2=y because the old version of MKINITRD and its Nash are not config_sysfs_ in the kernel The DEPRECATED_V2 parameter uses the old version of the SYSFS path format by default, so that the hard disk information node within the/sys is not properly accessed under the new kernel, and if you do not modify the kernel, you will not be able to find any errors such as VolGroup00, and the kernel boot fails directly. File system mount error.
Copy the original file to overwrite the. config file in the directory
cp/boot/config-2.6.32-431.11.2.el6.x86_64. config
Select y Overwrite file
sudo sh-c ' yes ' | Make Oldconfig '
Compile
Make (if a compilation error occurs, clean up and then compile make mrproper.
Installation
Make Modules_install Install
Modify the default boot boot
Vi/boot/grub/menu.lst
Change default to 0 boot to the kernel version you just installed
Restart
Shutdown-r now
5. Delete the original kernel
Rpm-q Kernel View
Yum remove files that are viewed
Linux kernel Upgrade