CentOS 6.X 内核升级 3.10

前端之家收集整理的这篇文章主要介绍了CentOS 6.X 内核升级 3.10前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

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

升级 CentOS 到 6.8 Final

  1. yum update

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

先导入公钥

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

导入源

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

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

最新版

  1. yum enablerepo=elrepo-kernel install -y kernel-ml

稳定版

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

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

  1. # grub.conf generated by anaconda
  2. #
  3. # Note that you do not have to rerun grub after making changes to this file
  4. # NOTICE: You do not have a /boot partition. This means that
  5. # all kernel and initrd paths are relative to /,eg.
  6. # root (hd0,0)
  7. # kernel /boot/vmlinuz-version ro root=/dev/sda1
  8. # initrd /boot/initrd-[generic-]version.img
  9. #boot=/dev/sda
  10. default=0
  11. timeout=5
  12. splashimage=(hd0,0)/boot/grub/splash.xpm.gz
  13. hiddenmenu
  14. title CentOS (3.10.104-1.el6.elrepo.x86_64)
  15. root (hd0,0)
  16. 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
  17. initrd /boot/initramfs-3.10.104-1.el6.elrepo.x86_64.img
  18. title CentOS (2.6.32-642.11.1.el6.x86_64)
  19. root (hd0,0)
  20. 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
  21. initrd /boot/initramfs-2.6.32-642.11.1.el6.x86_64.img
  22. title CentOS (2.6.32-358.el6.x86_64)
  23. root (hd0,0)
  24. 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
  25. initrd /boot/initramfs-2.6.32-358.el6.x86_64.img

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

然后重启
查看版本信息

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

搞定

猜你在找的CentOS相关文章