手动编译内核
编译时后应安装的支持
yum install perl
yum install bc
yum insatll gcc-c++
.uname -r 先查看内核版本
.yum groupinstall "Development Libraries" " Development Tools"
安装开发工具和库文件 可先yum grouplist 来查看
.下载kernel www.kernel.org
. tar xf linux-2.6.28.10.tar.gz -C/usr/src/
.cd /usr/src
.ln -sv linux-2.6.28.10 linux 创建个链接
.cd linux
.将原本的模块配置文件覆盖到当下的目录
cp /boot/config-2.6.-504.23..el6.x86_64 /usr/src/linux/.config
.make menuconfig 一定在内核目录下
报错:[root@localhost linux]# make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[]: *** [scripts/kconfig/dochecklxdialog] 错误
解决:yum install ncurses-devel
再次执行make menuconfig
.进入选择模块
用空格键选择 最后连安两下ESC键盘 保存退出
会生成一个.config的文件
.编译
make
make modules_install 安装内核模块
make install
.重启 选择新内核
二次编译时需清理
make clean
make mrproper
如有需要请提前备份.config文件