你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux-2.6.21.3编译详细过程总结

[日期:2007-08-23] 来源:Linux公社  作者:Ajian [字体:大 中 小]

3).修改/usr/src/linux/include/net/tcp.h

设置TIMEOUT的时间为1秒

#define TCP_TIMEWAIT_LEN (60*HZ) 60 ---> 1*HZ

设置在backlog队列里的半连接的重试次数,每次都会花相应的时间,本质上 也是减少重试时间

#define TCP_SYNACK_RETRIES 5 ---> 3

5、从原始的RHEL5的/usr/src/kernels/2.6.18-8.el5-i686/目录下cp一份.config文件到/usr/src/linux下

#cp /usr/src/kernel/2.6.18-8.e15-i686/.config /usr/src/linux

6、切换到/usr/src/linux开始编译新的内核

#cd /usr/src/linux;make menuconfig

不用任何改动,直接保存退出。

注:从2.6.19以后的内核中新增了ext4的文件系统,可在file systems中选择ext4文件系统模块

7、编译安装

步骤:make -jn(n代表同时编译的进程,可以加快编译速度,n由你的配置决定,我的配置用15-25)

make modules_install install

注:第一次编译安装新的内核可使用 make modules_install install,如果是更新或升级内核只需使用make modules_install,使用 make install系统在加载新的内核时会panic!

8、修改/etc/grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/sda3

# initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Red Hat Enterprise Linux Server (2.6.21.3)

root (hd0,0)

kernel /vmlinuz-2.6.21.3 ro root=LABEL=/

initrd /initrd-2.6.21.3.img

title Red Hat Enterprise Linux Server (2.6.18-8.el5)

root (hd0,0)

kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/

initrd /initrd-2.6.18-8.el5.img

9、reboot

10、启动后

#uname -r

2.6.21.3

内核编译安装成功。

linux
【内容导航】
第1页:Linux-2.6.21.3编译详细过程总结 第2页:Linux-2.6.21.3编译详细过程总结
相关资讯       Linux-2.6.21.3  Linux编译 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款