upgrade centos kernel centos内核升级

upgrade kernel

Centos 6.3 ships with kernel 2.6 and it’s quite old now ,and Centos 7 has kernel 3.10 ,so we try to upgrade kernel to 3.10 by yum quickly

Current system

root@pts/0 # cat /etc/redhat-release
CentOS release 6.3 (Final)

Install repo

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

Update kernel

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

Configure grub.conf

after update kernel ,you need to modify /etc/grup.conf and use new kernel as the first start item . change default from 1 to 0 as below :

default=0
timeout=3
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.75-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.10.75-1.el6.elrepo.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet

Reboot and check kernel

## reboot first
reboot
## check
root@pts/0 # uname -r
3.10.75-1.el6.elrepo.x86_64

Done

    原文作者:全栈运维
    原文地址: https://www.jianshu.com/p/14069fd3bce2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞