Linux:centos内核升级

时间:2021-05-08 20:36:00

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

Linux:centos内核升级

安装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内核升级