Linux Upgrade Kernel tutorial (CentOS7)

Source: Internet
Author: User

1. View the current kernel version
uname -R

2. Upgrading the kernel via Yum

Upgrading the kernel through Yum is the safest way to upgrade because the OS vendor has verified compatibility RPM packages and the upgrade risk is generally minimal.

Yum Install -y kernel

After rebooting, you can choose to use the new kernel in the Grub interface (the new kernel is usually used by default), so you can use the new kernel instead of just waiting for the machine to restart.

3. Upgrading the kernel by manually compiling

Manual compilation upgrade risk is relatively large, light may lead to application compatibility issues, the system may not start (of course, the old kernel is not deleted or can choose the old kernel to boot, if your screen can be directly connected to the machine rather than SSH)

But if you want to upgrade to a kernel version that is not officially used, you can only use manual compilation to upgrade

3.1 Downloads

https://www.kernel.org/pub/linux/kernel/

We are here to choose the latest version of the current 4.14 download

3.2 Compiling the installation
tar -zxf linux-4.14. Tar . GZCD CD Linux-4.14 make mrproper do clean              # Both of these are used to clear the. Ko and. config make oldconfig that were generated before compilation           #使用当前的内核配置make                     #编译, more than half an hour is normal   make Modules_install    #把编译出的内核模块复制到/lib/modules/${kernel_version}make  Install   

Make Oldconfig line represents the same configuration as the current kernel, the bad news is a new feature or we have to choose our own and the number of items, the good news is that these options have the default option if we don't care about these new features, you can always press and hold the carriage return.

Make config is the choice of each item, this is not recommended in addition to their own understanding of what to configure.

Make default is directly using the default configuration provided by Linus, this basic what not to compile and quickly but also not recommended, compile fast because a lot of things are not enabled to use this kernel your distribution basic restart will not come.

After installation, use reboot to restart the operating system, then use Uname-r to view, the kernel is successfully replaced with 4.14 version:

Linux Upgrade Kernel tutorial (CentOS7)

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.