Linux:centos内核升级

Posted Spiro-k

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux:centos内核升级相关的知识,希望对你有一定的参考价值。

centos内核升级

 


 

centos升级2.6内核到3.10

在yum的ELRepo源中,有 m ain l ine(3.13.1)、 l ong- t erm(3.10.28)这2个内核版本,long-time为长期支持。

查看看当前内核版本

uname -r

 

 

安装elrepo(http://elrepo.org/tiki/tiki-index.php

  • 导入public key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
  •  安装ELRepo到CentOS-6.5中
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

 

安装long-time版本内核(http://elrepo.org/linux/kernel/el6/i386/RPMS/)

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

 

 

编辑grub.conf

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 have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0 #将1修改为0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.105-1.el6.elrepo.i686)
        root (hd0,0)
        kernel /vmlinuz-3.10.105-1.el6.elrepo.i686 ro root=UUID=a8b6e96e-a14e-4907-9c36-e608dc2fe13a 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 /initramfs-3.10.105-1.el6.elrepo.i686.img
title CentOS 6 (2.6.32-642.el6.i686)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-642.el6.i686 ro root=UUID=a8b6e96e-a14e-4907-9c36-e608dc2fe13a 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 /initramfs-2.6.32-642.el6.i686.img


 

 

重启,查看内核

 

以上是关于Linux:centos内核升级的主要内容,如果未能解决你的问题,请参考以下文章

centos7怎么升级内核到4.2

Linux:centos内核升级

Centos7升级内核

Centos 升级内核安装 BBR 简易操作!

Linux升级内核教程(CentOS7)

新装Centos系统服务器升级Linux内核至3.0.88