CentOS 6.6下yum快速升级内核
1、导入public key
1 |
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org |
2、安装ELRepo到CentOS 6.6中
1 |
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm |
3、安装长期支持版本
1 |
yum --enablerepo=elrepo-kernel install kernel-lt -y |
4、编辑grub.conf文件,修改Grub引导顺序
1 |
vim /etc/grub.conf |
确认刚刚安装的内核的位置,然后将default修改一下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# 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 |
[root@MyServer ~]# uname -r 3.10.63-1.el6.elrepo.x86_64 |
版权声明
转载保留版权: 大D技研室 | 《CentOS 6.6下yum快速升级内核》
本文链接地址:https://www.dadclab.com/archives/5340.jiecao
转载须知:如果您需要转载本文,请将版权信息,版权授权方式,以及本文的链接地址注明,谢谢合作。
已有 6 条评论
发表评论
电子邮件地址不会被公开。 必填项已标注。
kvm的vps 也能这样装不
@kn007 没试过诶。
@大D 话说居然没有收到你邮件
@kn007 诶?垃圾邮件里也没有么?
而且时间貌似不对吧?快了8小时
好文章啊,因为主机商预装的linux2.6自带的curl低版本无法采集https,所以到处找解决方案。能升级内核的话,估计这个问题可以解决了。谢谢。