In the next 7 centos kernel upgrade

 

Foreword

Today, I read an article foreigner, talking about how to upgrade the kernel in a linux environment. Compare violence, is relatively simple, it is to be a record.
 
Article, the authors listed first common sense: linux kernel name, not the system name. We usually say "linux system" is wrong, accurate to say is: "to develop all kinds of linux kernel-based operating system." Well, the knee Arrow ~
 
Closer to home, how to say back to upgrade the kernel.

 
 

step

1. Review the current kernel

uname -sr

Of course, I did a test with another machine, here is the interception of the version number.

 

2. Use elrepo kernel upgrade, we tried to install it, by the way rpm

[root@slave1 ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@slave1 ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

 

3. Change yum cache, use this elrepo

[root@slave1 ~]# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

 

4. Install the latest stable version of the kernel, we need to wait a few minutes

[root@slave1 ~]# yum --enablerepo=elrepo-kernel install kernel-ml

 

5. Set the default boot kernel

Modify / etc / default / grub, this one will GRUB_DEFAULT set to 0, the default means started from the first startup item.

 

6. Refresh configured so that just the configuration to take effect

-o-Grub2 mkconfig /boot/grub2/grub.cfg

 

7. Restart After checking the version number, if it is the latest version, indicating successfully modified.


 
 
 

summary

Advantage of this method: a fool, upgrade by yum, but does not compile method
 
this method Disadvantages: their own screw around, the production can not be used, you can not be accurately upgraded to a particular version of the
 
 
 
PS ++: The reason I did this upgrade, at that time engaged in loading docker, which docker requirements of the operating system kernel to be higher than 3.10. Because my kernel version is too low, it will go to upgrade ~

Guess you like

Origin www.cnblogs.com/young233/p/10927091.html