升级centos内核
因要测试一些软件,需要2.6.30以上的内核,安装好CentOS 5.5,内核是2.6.18-194.el5.这次的升级还算比较顺利,具体的过程如下:
[root@localhost ~]# uname -r 2.6.18-194.el5
1.下载linux-2.6.30内核包到/usr/src目录
cd /usr/src wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.gz tar -xzvf linux-2.6.30.tar.bz2 -C /usr/src cd linux-2.6.30 make mrproper 清除环境变量,即清除配置文件 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” 编译成模块 (3).其它模块可以根据自己的需要进行选择,若不懂可以参考内核配置手册.
By admin
read more