Compile and upgrade the kernel in CentOS 6.4

Source: Internet
Author: User

You may need to upgrade the Linux kernel for the following reasons.

Try a new kernel module
Device Drivers require support from new kernel function modules
New vulnerabilities have been detected in earlier versions of the kernel.
The system often crashes.
For whatever reason, upgrading the Linux kernel is an important maintenance system.

Next we will learn how to Upgrade Linux kernel 2.6.32 to Linux kernel 3.2.48 LTS In CentOS 6.4.

1. Check the current kernel version of the system.

$ Uname-r2.6.32-358. el6.x86 _ 64
At the beginning of the upgrade, you need to install some necessary dependent software packages to build the kernel.

$ Sudo yum groupinstall "Development Tools"
$ Sudo yum install ncurses-devel and then install the existing system updates

$ Sudo yum update2: Start kernel Installation
Download the new kernel source code package 3.2.48 LTS from kernel.org and compile and install it.

$ Wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.2.48.tar.xz
$ Sudo tar xvfvJ linux-3.2.48.tar.xz-C/usr/src
$ Cd/usr/src/linux-3.2.48 before compiling a new kernel, You need to generate a Kernel configuration. If you want to generate a Kernel configuration through the graphical user interface, run:

$ Sudo make menuconfig

In addition, if you want to use the same Kernel configuration as the currently running kernel, run the following command:

$ Sudo make oldconfig if you want to use the old Kernel configuration and automatically accept the default settings for each option, run the following command:

$ Sudo sh-c 'yes "" | make oldconfig' after kernel settings are complete, start to compile the new kernel

$ Sudo make the above steps will take 30 minutes or longer, depending on your CPU speed. After the compilation is complete, the next step is to install the new kernel (and all kernel modules) as follows:

$ Sudo make modules_install install3. set the startup Item
To use the newly compiled kernel in your system, set the startup sequence in the grub menu.

$ Sudo vi/boot/grub. conf
Default = 1

Linux Kernel: click here
Linux Kernel: click here

Recommended: the Ubuntu 13.10 (Saucy Salamander) Kernel has been upgraded to Linux Kernel 3.10 RC5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.