centos7.5核心編譯安裝

來源:互聯網
上載者:User

標籤:菜單   使用   entry   .tar.xz   tar   grep   linux   default   模組   

1.安裝依賴

yum -y install gcc bc gcc-c++ ncurses ncurses-devel cmake elfutils-libelf-devel openssl-devel

2.下載核心版本解壓並進入解壓目錄(4.12.3版本)

wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.12.3.tar.xz && tar -xvf linux-4.12.3.tar.xz && cd linux-4.12.3

3.清理核心來源目錄

make mrproper

4.使用make menuconfig菜單來訂製核心功能 (這裡我們使用預設直接儲存即可)

make menuconfig

5.編譯(時間很長,可以吃幾局雞再來)

make

 

6.安裝模組(進入解壓目錄安裝模組,安裝完畢後可以到/lib/modules目錄下查看)

make modules_install

查看/lib/modules

7.執行make install 安裝核心相關檔案

make install

 

8.安裝完成後修改預設核心啟動項

cat /boot/grub2/grub.cfg | grep menuentry //查看系統可用核心 
grub2-set-default ‘CentOS Linux (4.12.3) 7 (Core)‘ //修改開機預設使用的核心

 

9.重啟電腦後uname -r查看核心版本

reboot

uname -r

這樣就完成了

 

centos7.5核心編譯安裝

聯繫我們

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