CentOS 6.5 upgrade Kernel Linux 3.12.17

Source: Internet
Author: User

Environment:

System hardware: VMware vsphere (cpu:2*4 core, memory 2G)

System version: Linux CentOS 2.6.32-431.el6.x86_64 (Centos-6.5-x86_64-minimal.iso)

Upgrade kernel version: longterm:3.12.17

Upgrade steps:

1. Virtual system Installation

Requires mininal mode installation (205 packages), the specific steps omitted.

  

2. View the original system kernel version, upgrade the update package

2.1 Update Package

[[email protected] ~]# Yum update

[email protected] ~]# Yum upgrade

2.2 Viewing the System kernel version

[Email protected] ~]# uname-a

Linux CentOS 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 03:15:09 UTC x86_64 x86_64 x86_64 gnu/linux

[Email protected] ~]# cat/etc/redhat-release
CentOS Release 6.5 (Final)

3. Download and install the toolkit needed to compile the environment

[email protected] ~]# Yum install vim wget
[email protected] ~]# Yum install gcc gcc-c++ XZ
[email protected] ~]# Yum install BC
[email protected] ~]# Yum install Ncurses-devel
[email protected] ~]# Yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel

[[email protected] ~]# Yum install Qt-devel #如果有X环境时安装 (not currently installed)

4. Download the kernel pack

4.1 Making a Directory
[Email protected] ~]# cd/usr/local/src/

4.2 Download the kernel package, currently the 3.12.17 version.
[Email protected] ~]# wget HTTPS://WWW.KERNEL.ORG/PUB/LINUX/KERNEL/V3.X/LINUX-3.12.17.TAR.XZ

  
5. Compiling the kernel

5.1 Unpacking, the kernel source directory
[Email protected] ~]# TAR-VXF LINUX-3.12.17.TAR.XZ
[Email protected] ~]# CD linux-3.12.17

/usr/local/src/linux-3.12.17 This directory when compiling the directory, the compilation process, the operation must be in this directory

5.2 Select the module to compile the kernel in the menu mode
[email protected] ~]# make Menuconfig

After opening the menu, save the <save> by default; and Exit <Exit>

After saving, the current directory will automatically generate the. config file

5.3 Viewing the current version and compiling it with the original compilation configuration

[Email Protected]tos ~]# uname-r
2.6.32-431.el6.x86_64

5.4 Copy the original configuration file to the compiled directory (as needed, the old mate file as a new mate template)

[Email protected] ~]# cp/boot/config-2.6.32-431.11.2.el6.x86_64. config

Tip Whether to overwrite, enter Y
[[email protected] ~]# sudo sh-c ' yes ' | Make Oldconfig '

Generate a new profile with the original configuration file, the default answer is Yes

  

5.5 Compiling the kernel (takes about 30-40 minutes)
[[email protected] ~]# make

  

5.6 Installing the Kernel

[[email protected] ~]# make Modules_install Install

When finished, you will be prompted could not find module Vmware_balloon, which is related to the virtual machine (ignore it)


6. Change the kernel used when the system starts
[Email protected] ~]# Vim/boot/grub/menu.lst

Modify the default=0, boot, the default starts with the first (3.12.17 kernel)

Save exit

7. Rebooting the system
[Email protected] ~]# Shutdown-r now

 

8. Confirm the current kernel version
[Email protected] ~]# uname-r

Linux CentOS 3.12.17 #1 SMP Fri Apr 03:32:42 CST x86_64 x86_64 x86_64 gnu/linux

The display kernel is 3.12.17, which means the upgrade kernel is successful

9. If the compilation fails, you can clear and recompile
[Email protected] ~]# cd/usr/local/src/linux-3.12.17
[[email protected] ~]# make Mrproper #完成或者安装过程出错 to clean up the last compiled site
[[email protected] ~]# make clean

10. If the upgrade is successful, you can delete the source directory
[Email protected] ~]# rm-rf/usr/local/src/linux-3.12.17

11. Delete the original kernel

11.1 See what kernel version is currently available

[Email protected] ~]# rpm-q kernel

Show the following versions

Kernel-2.6.32-431.el6.x86_64
Kernel-2.6.32-431.11.2.el6.x86_64

11.2 Deleting the original kernel

[[email protected] ~]# Yum remove kernel-2.6.32-431.el6.x86_64 #移除此版本的内核, and the boot menu will no longer appear in this kernel
[email protected] ~]# Yum Remove kernel-2.6.32-431.11.2.el6.x86_64

After deleting, viewing the boot menu will find that the kernel is missing

[Email protected] ~]# Cat/boot/grub/menu.lst

CentOS 6.5 upgrade Kernel Linux 3.12.17

Related Article

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.