centos 核心版本升級的兩種方式

來源:互聯網
上載者:User
第一種方法升級到最新版本,安裝較快
1.匯入keyrpm?--importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.org2.安裝elrepo的yum源rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm3. 安裝核心yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y4.查看設定預設啟動順序awk-F\' '$1=="menuentry "{print $2}' /etc/grub2.cfg,顯示結果應該是升級後的最新版本的核心在上面,執行以下命令:grub2-set-default 05.重啟reboot
第二種方法編譯方式安裝,安裝時間較長
https://www.kernel.org/下載指定版本https://www.kernel.org/pub/linux/kernel/v4.x/[root@node]#yum groupinstall "Development Tools" -y         [root@node]#yum install -y elfutils-libelf-devel bc openssl-devel ncurses-devel wget ntpdate vim net-tools      [root@node]#tar -xf linux-4.13.tar.gz   -C /usr/src/ [root@node]#cd /usr/src/linux-4.13/[root@node]#cp /boot/config-3.10.0-327.el7.x86_64 .config         這個是針對原來的版本[root@node]#sh -c 'yes "" | make oldconfig'[root@node]#make -j20 bzImage [root@node]#make -j20 modules[root@node]#make -j20 modules_install[root@node]#make install[root@node]#awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg[root@node]#grub2-set-default 0 [root@node]#uname -a   [root@node]#reboot   
相關文章

聯繫我們

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