1.安裝前準備:
安裝開發環境
獲取內核源碼包(www.kernel.org)
安裝軟件包
*curses*
安裝環境包組
Server Platform Development
Development Tools
2.安裝環境包組
[root@localhost ~]# yum -y groupinstall 'Server Platform Development' [root@localhost ~]# yum -y groupinstall 'Development Tools' [root@localhost ~]# yum -y install "*curses*"
3.下載源碼包
[root@localhost ~]# tar xf linux-3.18.41.tar.xz -C /usr/src 解壓至/usr/src
4.創建軟連接
[root@localhost src]# ln -s linux-3.18.41/ linux
5.將復制配置文件
[root@localhost src]# cp /boot/config-2.6.32-642.el6.x86_64 /usr/src/linux/.config
6.使用make menuconfig命令編輯內核
7.現在我們可以進行編譯了,可以指定cpu核心數。make -j #(請在/usr/src/linux操作)
8.編譯完成之后我們要安裝相關模塊make modules_install(請在/usr/src/linux操作)
9.最后一步,生成內核文件。make install(請在/usr/src/linux操作)
10.到此已經完成了內核編譯安裝了,我們重啟來看一下效果。
原創文章,作者:鬧鐘哥,如若轉載,請注明出處:http://www.www58058.com/47223