Last active
October 11, 2017 07:29
-
-
Save hangox/a9b977a9c026629101c38d5e6a2b4e76 to your computer and use it in GitHub Desktop.
更换cento7 的内核
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm | |
yum --enablerepo=elrepo-kernel install kernel-ml -y | |
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \' | |
grub2-set-default 0 # default 0 表示第一个内核设置为默认运行, 选择最新内核就对了 | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment