CentOS kernel compilation (kernel upgrade)
1. view the system kernel version
# Uname-r
2.6.18-92. el5
2,# Wgetwget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.gzDownload linux-3.13.tar.gzKernel source code file
3, # cd/usr/src/linux-3.13
4. # make mrproperClear environment variables, that is, clear the configuration file
5. # make menuconfigIn menu mode, select the kernel module to be compiled.
# Support for gcc and ncurses-devel is required. If not, install yum
6. # make & make modules_install & make install
Or gradually execute:
# Make clean make sure everything is up to date.
# Make bzImage: generate the Kernel File
# Make modules compilation Module
# Make modules_install installation Module
# Make install Installation
# Mkinitrd/boot/initrd_2.6.18.img generate an image file based on the kernel version and specified parameters
# Cp arch/x86/boot/bzImage/boot/vmlinuz-2.6.18
# Cp/usr/src/linux-2.6.18/System. map/boot/System. map-2.6.18
7. # vi/boot/grub. conf# Start the system with a new kernel and restart the system;