微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS 6.X 内核升级 3.10

yum 源可以配到国内的镜像来加速 阿里云,网易,搜狐都可以

这里给个阿里云的说明 http://mirrors.aliyun.com/hel...

升级 CentOS 到 6.8 Final

yum update

配置 elrepo(官网) 提供的内核源来升级内核

先导入公钥

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

导入源

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

然后可以选择安装最新版内核,或者稳定版内核

最新版

yum –enablerepo=elrepo-kernel install -y kernel-ml

稳定版

yum --enablerepo=elrepo-kernel install kernel-lt -y

最后编辑 /etc/grub.conf 启动文件

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /,eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.104-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-3.10.104-1.el6.elrepo.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-3.10.104-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-642.11.1.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-642.11.1.el6.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-642.11.1.el6.x86_64.img
title CentOS (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-358.el6.x86_64.img

title顺序从上往下 0,1,2
认新装的应该排在最上面
所以把default值改成0

然后重启
查看版本信息

#cat /etc/redhat-release
CentOS release 6.8 (Final)
# uname -r
3.10.104-1.el6.elrepo.x86_64

搞定

原文地址:https://www.jb51.cc/centos/379375.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。