Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1813074
  • 博文数量: 496
  • 博客积分: 12043
  • 博客等级: 上将
  • 技术积分: 4778
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-27 14:26
文章分类

全部博文(496)

文章存档

2014年(8)

2013年(4)

2012年(181)

2011年(303)

2010年(3)

分类: LINUX

2011-07-15 13:52:55

因要一些软件,需要2.6.30以上的内核,安装好CentOS 5.5,内核是2.6.18-194.el5.这次的升级还算比较顺利,具体的过程如下:

  1.-2.6.30内核包到/usr/src目录

  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).其它模块可以根据自己的需要进行选择,若不懂可以参考内核配置手册.
  make clean 确保所有东西均保持最新状态.
  make bzImage 生成内核文件
  make modules 编译模块
  make modules_install 安装模块
  make install 安装
  mkinitrd /boot/initrd_2.6.30.img 2.6.30 根据内核版本和指定参数生成映像文件
  cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.30
  cp /usr/src/-2.6.30/System.map /boot/System.map-2.6.30
  2.在/etc/grub.conf添加如下2.6.30的信息,并把default=1改为default=0
3.此步若没有操作,重启会报错”insmod: error inserting ‘/lib/dm-region-hash.ko’: –1 File exits”,原因是重复了,根据网上查到的资料,2.6.x自编译内核会有这个小bug,我过不修改直接重启,虽然有报错,但仍然可以进入系统的.

  4.重启成功后,再看看内核,是2.6.30,ok了。
阅读(916) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~