CentOS 6.5 升級核心相關教程

來源:互聯網
上載者:User

1.下載源碼包

網址:http://www.kernel.org

在首頁可以看到有stable,longterm等版本,一般選擇下載longterm版本,因為此版本為提供長期支援的穩定版,因此我選擇3.12.16.

[root@CentOS-BinaryDev~]# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.12.16.tar.xz

2.解壓並進入目錄

[root@CentOS-BinaryDev~]# tar -xf linux-3.12.16.tar.xz

[root@CentOS-BinaryDev~]# cd linux-3.12.16

3.更新當前系統

[root@CentOS-BinaryDev~]# yum update

[root@CentOS-BinaryDev~]# yum upgrade

4.安裝編譯核心所需要的軟體包

[root@CentOS-BinaryDev~]# yum groupinstall “Development Tools”

[root@CentOS-BinaryDev~]# yum install ncurses-devel

[root@CentOS-BinaryDev~]# yum install qt-devel

[root@CentOS-BinaryDev~]# yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel

5.查看當前系統核心

[root@CentOS-BinaryDev~]# uname -r

2.6.32-358.11.1.el6.x86_64

6.將當前系統核心的設定檔拷貝到目前的目錄

[root@CentOS-BinaryDev~]#cp /boot/config-2.6.32-358.11.1.el6.x86_64 .config

7.使用當前系統核心配置,並自動接受每個新增選項的預設設定

[root@CentOS-BinaryDev~]# sh -c ' yes “” | make oldconfig'

8.編譯

[root@CentOS-BinaryDev~]# make bzImage

[root@CentOS-BinaryDev~]# make modules

[root@CentOS-BinaryDev~]# make modules_install

9.安裝

[root@CentOS-BinaryDev~]# make install

如果出現少量ERROR可以忽略

10.修改Grub引導順序

[root@CentOS-BinaryDev~]# vim /etc/grub.conf

一般新核心的位置都在第一個,所以設定default=0.

11.重啟後查看核心版本號碼

[root@CentOS-BinaryDev~]# uname -r

3.12.16

12.如果失敗,轉至第5步,在重新開始之前,需要清理上次編譯的現場

[root@CentOS-BinaryDev~]# make mrproper

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.