使用yum快速升級CentOS 6.5核心到 3.10.28

來源:互聯網
上載者:User

標籤:

網上有不少升級CentOS核心的文章,如《CentOS 6.5 升級核心到 3.10.28》,大部分都是下載源碼編譯,有點麻煩。

在yum的ELRepo源中,有mainline(3.13.1)、long-term(3.10.28)這2個核心版本,考慮到long-term更穩定,會長期更新,所以選擇這個版本。

1、匯入public key

1 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2、安裝ELRepo到CentOS-6.5中

 
1 rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm

3、安裝kernel-lt(lt=long-term)

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

或者安裝kernel-ml(ml=mainline)

 
1 yum --enablerepo=elrepo-kernel install kernel-ml -y

4、編輯grub.conf檔案,修改Grub引導順序

 
1 vim /etc/grub.conf

 

 
12345678910111213141516171819202122232425262728 # grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE:  You do not have a /boot partition.  This means that#          all kernel and initrd paths are relative to /, eg.#          root (hd0,0)#          kernel /boot/vmlinuz-version ro root=/dev/sda1#          initrd /boot/initrd-[generic-]version.img#boot=/dev/sdadefault=0timeout=5splashimage=(hd0,0)/boot/grub/splash.xpm.gzhiddenmenutitle CentOS (3.10.28-1.el6.elrepo.x86_64)        root (hd0,0)        kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet        initrd /boot/initramfs-3.10.28-1.el6.elrepo.x86_64.imgtitle CentOS (2.6.32-431.3.1.el6.x86_64)        root (hd0,0)        kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet        initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.imgtitle CentOS (2.6.32-431.el6.x86_64)        root (hd0,0)        kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 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 /boot/initramfs-2.6.32-431.el6.x86_64.img

確認剛安裝好的核心在哪個位置,然後設定default值(從0開始),一般新安裝的核心在第一個位置,所以設定default=0。

5、重啟,查看核心版本號碼

12 [root@dev ~]# uname -r3.10.28-1.el6.elrepo.x86_64

 

轉載自 http://ljf.me/archives/use-yum-to-quickly-upgrade-centos-6-5-kernel-3-10-28

使用yum快速升級CentOS 6.5核心到 3.10.28

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.