首页 > RedHat/CentOS操作系统 > CentOS 6.6下yum快速升级内核

CentOS 6.6下yum快速升级内核

2015年9月17日

CentOS 6.6下yum快速升级内核

CentOS 6.6下yum快速升级内核

1、导入public key
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
2、安装ELRepo到CentOS 6.6中

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
3、安装长期支持版本

yum –enablerepo=elrepo-kernel install kernel-lt -y
4、编辑grub.conf文件,修改Grub引导顺序

vim /etc/grub.conf
确认刚刚安装的内核的位置,然后将default修改一下。

# 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/mapper/vg_have-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/xvda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.63-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.10.63-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_have-lv_root rd_LVM_LV=vg_have/lv_root rd_LVM_LV=vg_have/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0 crashkernel=auto rhgb quiet
initrd /initramfs-3.10.63-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-504.3.3.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.3.3.el6.x86_64 ro root=/dev/mapper/vg_have-lv_root rd_LVM_LV=vg_have/lv_root rd_LVM_LV=vg_have/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0 crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-504.3.3.el6.x86_64.img
title CentOS (2.6.32-358.6.1.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.6.1.el6.x86_64 ro root=/dev/mapper/vg_have-lv_root rd_LVM_LV=vg_have/lv_root rd_LVM_LV=vg_have/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0 crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-358.6.1.el6.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_have-lv_root rd_LVM_LV=vg_have/lv_root rd_LVM_LV=vg_have/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0 crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-220.el6.x86_64.img
title CentOS (2.6.32-131.0.15.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=/dev/mapper/vg_have-lv_root rd_LVM_LV=vg_have/lv_root rd_LVM_LV=vg_have/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0 crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img
新装的内核位置为0,所以讲default修改为0,保存退出重启。

5、检查内核
1
2
[[email protected] ~]# uname -r
3.10.63-1.el6.elrepo.x86_64

分类: RedHat/CentOS操作系统 标签:
本文的评论功能被关闭了.