编译内核怎么弄?

发表于:2007-06-09来源:作者:点击数: 标签:
安装好了freebsd4。7 我按照下面的做了 cd/sys/i386/conf cpGENERIC./kernel_ipfw 用编辑器打开kernel_IPFW这个文本文件,在该文件里加入以下内容: optionsIPFIREWALL//通知操作系统的内核检查每个IP数据包,将它们与规则集进行比较 optionsIPDIVERT//启用

安装好了freebsd4。7
我按照下面的做了
cd /sys/i386/conf 
cp GENERIC ./kernel_ipfw

用编辑器打开kernel_IPFW这个文本文件,在该文件里加入以下内容: 

optionsIPFIREWALL        //通知操作系统的内核检查每个IP数据包,将它们与规则集进行比较 
optionsIPDIVERT        //启用由ipfw divert使用的转向IP套接字。这一选项需要与natd联合使用。 
optionsIPFIREWALL_VERBOSE       //向系统的注册程序发送注册信息包。 
optionsIPFIREWALL_VERBOSE_LIMIT=100       //限制一台机器注册的次数。 
optionsIPSTEALTH        //启动支持秘密转发的代码,这一选项在使防火墙不被traceroute和类似工具发现时很有用。 
optionsACCEPT_FILTER_DATA       
optionsACCEPT_FILTER_HTTP      //接受过滤器中的静态连接 
optionsICMP_BANDLIM        //ICMP_BANDLIM根据带宽限制产生icmp错误。一般情况下我们需要这个选项,它有助于你的系统免受D.O.S.攻击。 

把以上参数加入以后保存kernel_ipfw文件。 

上面的做好了 接下去输入
make depend
提示  [color=red:262b4419a5]make dont know how to make depend . stop [/color:262b4419a5] 我不知道盖怎么弄? 
我看了论坛以前的帖子有相关的问题但是又不懂

[color=green:262b4419a5]--------------------------------------------------------------------------------
 
不知道你的source是不是装了 
你把你的kernel文件重新换个名字,比如IPFW,再按我的方法试一下. 
注意别敲错命令,我发现你的kernel拼写有错误


_________________
Free is NOT cheap. 
I love free 
I love FreeBSD [/color:262b4419a5]
我的问题是不是也是名字的问题?要怎么才能改名?
cd ../../compile/kernel_IPFW 
make 
make install

 stevensli 回复于:2003-03-03 13:52:00
Procedure 1. Building a kernel the ``traditional'' way
Run config( to generate the kernel source code.

   # /usr/sbin/config MYKERNEL

Change into the build directory.

    # cd ../compile/MYKERNEL

For FreeBSD version prior to 5.0, use instead:

    # cd ../../compile/MYKERNEL

Compile the kernel.

    # make depend
    # make

Install the new kernel.

    # make install


Procedure 2. Building a kernel the ``new'' way

Change to the /usr/src directory.

    # cd /usr/src

Compile the kernel.

    # make buildkernel KERNCONF=MYKERNEL

Install the new kernel.

    # make installkernel KERNCONF=MYKERNEL

Note: In FreeBSD 4.2 and older you must replace KERNCONF= with KERNEL=. 4.2-STABLE that was fetched before Feb 2nd, 2001 does not recognize KERNCONF=.

 henkon 回复于:2003-03-03 13:31:52
config 内核文件名

 夜猫子 回复于:2003-03-03 13:33:26
你要先在/sys/i386/conf下运行
config ./kernel_ipfw
然后
cd ../../compile/kernel_IPFW
make depend &&  make && make install

 quakelee 回复于:2003-03-03 18:43:55
你们就不能提供一个有创意的方法,比如我就会用
cd /usr/src
make buildkernel KERNCONF=kernel_IPFW 
make installkernel KERNCONF=kernel_IPFW

 bluepunk 回复于:2003-03-03 18:30:46
#pwd
/sys/i386/conf
config ./kernel_ipfw
#cd ../../compile/kernel_IPFW
#make depend all install

 dabeck 回复于:2003-03-27 10:14:06
人家不是说了嘛。

 ihweb 回复于:2003-03-27 10:33:34
[quote:9a6daea6b1="quakelee"]你们就不能提供一个有创意的方法,比如我就会用
cd /usr/src
make buildkernel KERNCONF=kernel_IPFW 
make installkernel KERNCONF=kernel_IPFW[/quote:9a6daea6b1]

有空可真的要试试这种编译内核的方法。

 onedaycj 回复于:2003-03-29 16:16:56
[quote:f48fed359c="ihweb"]

有空可真的要试试这种编译内核的方法。[/quote:f48fed359c]
好慢呢....

 quakelee 回复于:2003-03-29 23:48:55
什么叫做有空,没空才用我的方法,因为省掉了
config mykern
cd ../../compile/mykern
make depend
make
这四步,而用一步解决了

原文转自:http://www.ltesting.net