CentOS 6.5 Compilation Upgrade kernel

Source: Internet
Author: User

1. Download kernel , official website:https://www.kernel.org/

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/D8/wKiom1cKLDuyBa_HAALy6nAkKsM532.png "title=" 1.png " Style= "Float:none;" alt= "Wkiom1cklduyba_haaly6nakksm532.png"/>

The 3.18.30 version is used here , and the system information is as follows:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/D8/wKiom1cKLDvhaze5AABrbpTlmyo371.png "title=" 2.png " Style= "Float:none;" alt= "Wkiom1ckldvhaze5aabrbptlmyo371.png"/>


2. Prepare before compiling

Install compilation dependencies

# yum Grouplist//view installed and not installed package groups to determine if we have the appropriate development environment and Development Library; # yum Groupinstall "Developmenttools"//typically installs these two package groups, Doing so will make sure you have all the tools you need to compile it # Yum install Ncurses-devel//You have to do this to get make*config this command to execute correctly # Yum install Qt-devel//If you don't have an X environment, this one can be used without # yum Install Hmaccalc zlib-develbinutils-devel elfutils-libelf-devel//need them when creating CentOS-6 kernels


Unzip the file

# TAR-XF Linux-3.18.30.tar.xz-c/usr/src/

3, to the next step is to configure the kernel, this step to configure the kernel method has a variety of, every make is a method, we only choose one on the :

Make config: Traverse to select the kernel features to compile

Make Allyesconfig: Configure all the kernel features that can be compiled

Make Allnoconfig: Not all do not compile, but can choose to answer no, only necessary are selected as Yes.

Make Menuconfig: This is to open a File window selection menu, this command needs to open the window is larger than the width of the characters, you can open it to select the items to be compiled

The following two can be selected with the mouse point, more convenient OH:

Make Kconfig (KDE desktop environment, and the QT development environment is installed)

Make Gconfig (Gnome desktop environment, and install gtk Dev Environment )

Menuconfig: Using this command, if it is a new installation of the system will be installed gcc and ncurses-devel These two packages can open, and then choose on it, and this method is also used more

This establishes a new compilation option based on the original kernel configuration file of the system, so copy one to the current directory, named . config. Here , the # make Oldconfig command reads the. config file in the current directory , and the option not found in the. config file prompts the user to fill in,#make oldconfig back up to . Config.old before generating a new . config file and generating a new . config

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/D5/wKioL1cKLO3gVLGXAADOgC4wgeY708.png "title=" 3.png " Style= "Float:none;" alt= "Wkiol1cklo3gvlgxaadogc4wgey708.png"/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/D8/wKiom1cKLDzgj_8dAAA3PT2nsNc223.png "title=" 4.png " Style= "Float:none;" alt= "Wkiom1ckldzgj_8daaa3pt2nsnc223.png"/>


4. Start compiling

# MAKE-J4 Bzimage//Generate kernel File # MAKE-J4 modules//compile module # MAKE-J4 Modules_install//Compile installation module

-j After the number is the number of threads, used to speed up the compilation speed, the general experience is that the logical CPU, just fill that number, for example, there are 8 cores, then -j8, see the CPU coresas follows , So the-j6 is used here.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/D5/wKioL1cKLO7CDHxUAABHmd0u7So927.png "title=" 5.png " Style= "Float:none;" alt= "Wkiol1cklo7cdhxuaabhmd0u7so927.png"/>

5. Installation

# make Install

when actually running to this step, there is a ERROR:modinfo:could not find module Vmware_balloon, but does not affect kernel installation, is due to the need for vsphere module is not compiled, to avoid this problem, you need to make Before you modify the. config file, add

Hypervisor_guest=y

Config_vmware_balloon=m

Can be cleaned up before recompiling, of course, without affecting the use of directly ignoring the

# make Mrproper #完成或者安装过程出错 to clean up the last compiled live #

6. Modify Grub boot and restart

after the installation is complete, you need to modify Grub Boot order to have the newly installed kernel as the default kernel.

edit grub.conf file,

Vi/etc/grub.conf

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/D8/wKiom1cKLDzyfhJ9AADHGn4gT6c796.png "title=" 6.png " Style= "Float:none;" alt= "Wkiom1ckldzyfhj9aadhgn4gt6c796.png"/>

Take a look at where the newly installed kernel is located, starting with 0, and then setting default to 0, generally the newly installed kernel is in the first position, so set default=0.

Restart reboot:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/D5/wKioL1cKLO-QvgTDAABdjbNrPNQ354.png "title=" 7.png " Style= "Float:none;" alt= "Wkiol1cklo-qvgtdaabdjbnrpnq354.png"/>

7, the kernel compiles, confirm the current kernel:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7E/D8/wKiom1cKLD3x4K_NAABuwc3dsM4211.png "title=" 8.png " Style= "Float:none;" alt= "Wkiom1ckld3x4k_naabuwc3dsm4211.png"/>


This article is from the "Bamboo Potential" blog, please be sure to keep this source http://peaceweb.blog.51cto.com/3226037/1762391

CentOS 6.5 Compilation Upgrade kernel

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.