分类: LINUX
2008-03-16 22:42:26
FC4源码下载地址:
然后用#rpmbuild -bp --target $(uname -m) /usr/src/redhat/SPEC/iptables.spec 用于创建iptables源码
kernel源码也同样创建。然后修改内核源码的Makefile,修改成和uname -r一致
[code]VERSION = 2
[/code]
PATCHLEVEL = 6
SUBLEVEL = 11
EXTRAVERSION = -1.1369_FC4
下载connlimit模块补丁
wget
解压后打入补丁## KERNEL_DIR=/usr/src/linux IPTABLES_DIR=/usr/src/iptables ./runme connlimit
然后make menuconfig选择上新增的Connections/IP limit match support模块,保存退出。
[code]make menuconfig 出現下列錯誤
...
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:31:20: error: curses.h: No such file or directory
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:128: error: syntax error before 'use_colors'
scripts/kconfig/lxdialog/dialog.h:128: warning: type defaults to 'int' in declaration of 'use_colors'
scripts/kconfig/lxdialog/dialog.h:128: warning: data definition has no type or storage class
scripts/kconfig/lxdialog/dialog.h:129: error: syntax error before 'use_shadow'
...
原因為缺少 ncurses devel 套件 (name "libncurses5-dev" in Ubuntu),安裝後即可
$ sudo apt-get install libncurses5-dev
如果是FC系列,是安装yum -y install ncurses-devel[/code]