歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS 6.4系統內核升級

CentOS 6.4系統內核升級

日期:2017/2/28 14:37:08   编辑:Linux教程

CentOS 6.4系統內核升級

1.查看現有系統的內核版本
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
[root@localhost ~]#

2.下載交解壓新內核文件
[root@localhost home]# tar xvf linux-2.6.38.7.tar.gz
[root@localhost home]# cd linux-2.6.38.7
[root@localhost linux-2.6.38.7]#

3.升級內核的具體步驟
[root@localhost linux-2.6.38.7]# make mrproper --清除環境變量,即清除配置文件
[root@localhost linux-2.6.38.7]# make menuconfig --在菜單模式下選擇需要編譯的內核模塊
networking support —> networking options —> network packet filtering framework(netfilter)
(1).core netfilter configuration
A 勾中”Netfilter connection tracking support” -m state相關模塊是依賴它的,不選則沒有。
B 將netbios name service protocal support(new) 編譯成模塊,不然後面升級iptables後啟動時會出錯
C 勾中“Netfilter Xtables support (required for ip_tables)”
(2).IP: Netfilter Configuration
A 將 “IPv4 connection tracking support (require for NAT)” 編譯成模塊。
B 勾中IP tables support (required for filtering/masq/NAT) 。
C 將 “Full NAT” 下的 “MASQUERADE target support” 和 “REDIRECT target support” 編譯成模塊
[root@localhost linux-2.6.38.7]# make clean --確保所有東西均保持最新狀態.
[root@localhost linux-2.6.38.7]# make bzImage --生成內核文件
[root@localhost linux-2.6.38.7]# make modules --編譯模塊
[root@localhost linux-2.6.38.7]# make modules_install --安裝模塊
[root@localhost linux-2.6.38.7]# make install --安裝
[root@localhost linux-2.6.38.7]# vim /etc/grub.conf
default=0 --將這一行改為0(選擇啟動時加載哪個內核)
[root@localhost linux-2.6.38.7]# reboot --重啟系統

4. 驗證內核是否成功
(1)系統啟動時可以看到內核



(2)在系統中查看內核

CentOS 6.4系統中編譯和升級內核 http://www.linuxidc.com/Linux/2013-08/89325.htm

更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14

Copyright © Linux教程網 All Rights Reserved