The purpose of the upgrade is to run docker on CentOS6.4. it is recommended that the kernel version be 3.8.0 or later, so you can download the source code from the Linux kernel official website and compile and install the software to compile and install the new kernel, depends on the development environment and development library yumgrouplist // view installed and uninstalled software package groups to determine whether the corresponding development environment and development library are installed; yumgro
The purpose of the upgrade is to run docker on CentOS6.4. it is recommended that the kernel version be 3.8.0 or later, so you can download the source code from the Linux kernel official website and compile it yourself.
Install software
Compile and install the new kernel, depending on the development environment and development Library
Yum grouplist // Check the installed and uninstalled software package groups to determine whether the corresponding development environment and development library are installed;
Yum groupinstall "Development Tools" // usually install these two software packages. This will make sure you have all the Tools required for compilation.
Yum install ncurses-devel // you must execute this command to make * config correctly.
Yum install qt-devel // If you do not have an X environment, you do not need to use this one.
Yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel // they are required when creating the CentOS-6 kernel
Compile the kernel to obtain and decompress the kernel source code and configure the compilation items.
Go to the http://www.kernel.org home page, you can see stable, longterm and other versions, longterm is a more stable version than stable, will be updated for a long time, so I choose 3.18.19
[Root @ root ~] # Tar-xf linux-3.18.19.tar.xz
[Root @ root ~] # Cd linux-3.18.19
We create new compilation options based on the original kernel configuration file of the system, so copy it to the current directory and name it. config
[Root @ root llinux-3.18.19] # cp/boot/config-2.6.32-358.el6.x86_64. config (Note that the package must be in the directory of the decompressed package.)
Sh-c 'Yes "" | make oldconfig'
######################################## ######################################## ##########
###### Make oldconfig reads the. config file in the current directory. If no options are found in the. config file, the system prompts the user to fill in. Some documents introduce the use of make memuconfig, which is to manually select the menu customization module as needed, which is not required here. Make oldconfig will back up to. config. old before generating new. config, and generate a new. config file.
###### (The above Command automatically compiled sh-c 'Yes "" | make oldconfig' based on the OS module you installed earlier ')
######################################## ######################################## ##########
Start compilation
[Root @ root linux-3.10.58] # make-j4 bzImage // Generate kernel file
[Root @ root linux-3.10.58] # make-j4 modules // compilation module
[Root @ root linux-3.10.58] # make-j4 modules_install // compile the installation module
-The number after j is the number of threads used to speed up compilation. Generally, the logic CPU is used to enter that number. for example, if there is 8 cores, it is-j8.
Install
Make install
When this step is actually executed
Modinfo: cocould not find module vmware_balloon, but does not affect kernel installation. it is because the modules required by vsphere are not compiled. to avoid this problem, you must modify the. config file before make and add
HYPERVISOR_GUEST = y
CONFIG_VMWARE_BALLOON = m
Modify the Grub boot sequence
Vim/etc/grub. conf
Count the position where the newly installed kernel is located, starting from 0, and then set default to that number. Generally, the newly installed kernel is in the first position, so set default to 0.
Reboot
The following is an example of yum upgrade:
Http://ljf.me/archives/use-yum-to-quickly-upgrade-centos-6-5-kernel-3-10-28/