参考文档:http://www.xiexianbin.cn/linux/2015/10/15/quickly-upgrade-centos6.5-kernel-from-2.6.32-to-3.10.90/

kernel简介

在yum的ELRepo源中,有mainline(3.13.1)、long-term(3.10.90)这2个内核版本,考虑到long-term更稳定,会长期更新,所以本人推荐选择kernel-lt这个版本。

升级步骤

导入public key

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

安装ELRepo

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

安装kernel-lt 3.10.90

这里的lt=long-term,这里推荐安装kt,下载地址:http://pan.baidu.com/s/1eQuJkcU。

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

或者安装kernel-ml,ml=mainline。命令如下:

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

修改启动引导顺序

修改前:

[root@xiexianbin_cn ~]# vim /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/xvda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/xvda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-573.7.1.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-573.7.1.el6.x86_64 ro root=UUID=94e4e384-0ace-437f-bc96-057dd64f42ee rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /boot/initramfs-2.6.32-573.7.1.el6.x86_64.img
title CentOS (2.6.32-431.23.3.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-431.23.3.el6.x86_64 ro root=UUID=94e4e384-0ace-437f-bc96-057dd64f42ee rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /boot/initramfs-2.6.32-431.23.3.el6.x86_64.img

修改后:

[root@xiexianbin_cn ~]# vim /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/xvda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/xvda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.90-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-3.10.90-1.el6.elrepo.x86_64 ro root=UUID=94e4e384-0ace-437f-bc96-057dd64f42ee rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /boot/initramfs-3.10.90-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-573.7.1.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-573.7.1.el6.x86_64 ro root=UUID=94e4e384-0ace-437f-bc96-057dd64f42ee rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /boot/initramfs-2.6.32-573.7.1.el6.x86_64.img
title CentOS (2.6.32-431.23.3.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-431.23.3.el6.x86_64 ro root=UUID=94e4e384-0ace-437f-bc96-057dd64f42ee rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /boot/initramfs-2.6.32-431.23.3.el6.x86_64.img

修改前,前确认新安装安装内核的位置,然后设置default值(从0开始),一般新安装的内核在第一个位置,所以设置default=0。

重启生效

升级前kernel版本:

[root@xiexianbin_cn ~]# uname -a
Linux xiexianbin_cn 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 22:00:00 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

升级后kernel版本:

[root@xiexianbin_cn ~]# uname -a
Linux xiexianbin_cn 3.10.90-1.el6.elrepo.x86_64 #1 SMP Thu Oct 1 15:15:53 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

更多内核下载地址

可能存在的问题

遇到CentOs内核升级后,启动无法指定系统内核。原因是/etc/grub.conf和/boot/grub/grub.conf(为准)信息不同步导致。

cp -rf /boot/grub/grub.conf /etc/grub.conf

完毕。

如何快速的将Centos6.7快速升级3.10.9的更多相关文章

  1. Centos6.5快速配置可用网卡

    原文链接: Centos6.5快速配置可用网卡 安装完成后,我们启动我们的系统,此时我们的系统,是没有连网的,IP设备,并没有被激活,如果我们使用ifconfig命令查看IP地址,就会发现,此刻的地址 ...

  2. CentOS6.9快速安装配置svn

    CentOS6.9快速安装配置svn 环境介绍: 操作系统:CentOS release 6.9 (Final)192.168.65.130 (svn服务器)192.168.65.129 (svn客户 ...

  3. 烂泥:centos6 yum方式升级内核

    本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 最近没有时间好久没有写文章了,今天由于需要安装docker学习虚拟容器的知识,需要升级O ...

  4. 关于centos7和centos6中平滑升级nginx到新版本v1.12.1修复nginx最新漏洞CVE-2017-7529的解决方案

    关于centos7和centos6中平滑升级nginx到新版本v1.12.1修复CVE-2017-7529漏洞的解决方案 漏洞描述 2017年7月11日,Nginx官方发布最新的安全公告,在Nginx ...

  5. CentOS6.9下升级默认的OpenSSH操作记录(升级到OpenSSH_7.6p1)

    近期对IDC机房服务器做了一次安全漏洞扫描,漏扫结果显示服务器的OpenSSH版本太低(CentOS6默认是OpenSSH_5.3p1),存在漏洞隐患,安全部门建议升级到OpenSSH_7.6p1.升 ...

  6. centos6 yum方式升级内核【转】

    最近没有时间好久没有写文章了,今天由于需要安装docker学习虚拟容器的知识,需要升级OS的内核.目前我这边使用的OS是centos6.5,内核是2.6版本的,如下: cat /etc/issue u ...

  7. CentOS6 系统下升级python后yum命令使用时报错

    CentOS6 系统下升级python后yum命令使用时报错,如下: [root@xxxxxxx]#yumFile"/usr/bin/yum",line30exceptKeyboa ...

  8. CentOS6.x 安装升级Python2.7.x Python3.4.x

    CentOS6.x 安装升级Python2.7.x Python3.4.x 2015-06-07• CentOS.Linux • 评论关闭 CentOS release 6.6 (Final) 安装升 ...

  9. NYOJ-676小明的求助,快速幂求模,快速幂核心代码;

    小明的求助 时间限制:2000 ms  |  内存限制:65535 KB 难度:2 描述 小明对数学很有兴趣,今天老师出了道作业题,让他求整数N的后M位,他瞬间感觉老师在作弄他,因为这是so easy ...

随机推荐

  1. C#程序部署到Android

    C#是一种优秀的编程语言,语法之优雅,代码之简洁使得众多软粉多年来对她不离不弃. 但是如何将C#程序部署到Linux, Android等平台,这当然是得依靠众所周知的Mono. 本文Demo程序比较简 ...

  2. EF多表查询方式

    5, 连接 可以的连接有Join 和 GroupJoin 方法.GroupJoin组联接等效于左外部联接,它返回第一个(左侧)数据源的每个元素(即使其他数据源中没有关联元素). using (var ...

  3. ARM学习笔记10——GNU ARM命令行工具

    一.编译器arm-linux-gcc 1.用arm-linux-gcc编译一个程序,一般它是要经过如下步骤的: 1.1.预处理阶段 编译器把上述代码中stdio.h编译进来,使用GCC的选项-E可以使 ...

  4. C#开发移动平台iOS、Android 与Windows

    1.Xamarin http://www.csdn.net/article/2014-02-28/2818585-Xamarin-CSDN-mobile-develop

  5. Eclipse 下载与安装(2014.12.26——by小赞)

    Eclipse网站首页:http://www.eclipse.org/home/index.php Eclipse下载页网址:http://www.eclipse.org/downloads/ 步骤一 ...

  6. VirtualBox安装Ghost XP

    http://jingyan.baidu.com/album/5d368d1e1a88b73f60c05721.html?picindex=1

  7. final效率分析

    1. 被final修饰的类 public final class FinalClass { public void getJava() { String str1 = "Java " ...

  8. yii2

    yii2框架官方说明文档 http://www.yiiframework.com/doc/guide/2.0/zh_cn/caching.page yii2创建您的第一个application应用 h ...

  9. Python 3语法小记(六)条件、循环和assert、pass、del

    条件: if 条件:     语句块 elif:     语句块 else:     语句块 elif 表示 else if 这居然是合法的!!!1 < x < 2!!! >> ...

  10. [Node.js] Exporting Modules in Node

    In this lesson, you will learn the difference between the exports statement and module.exports. Two ...