分类: BSD
2006-06-13 10:40:13
FreeBSD全能服务器安装手册之内核编译篇
################################编译系统内核###################################
进入内核编辑区域
cd /usr/src
多线程支持加快编译速度(注意:cpu的占用率会升高)
make -j4 buildworld
备份原有内核
cd /usr/src/sys/i386/conf
cp GENERIC /root/GENERIC.OLD
编辑内核
ee NS1
建立内核
cd /usr/src
make buildkernel
安装内核
make installkernel
重新启动计算机
shutdown -r now
mergemaster -p
更新系统配置文件。这个命令后会跟随多个提示问题建议仔细阅读后做出选择,如果是安装系统后第一次同步代码,并是在没有安装任何软件的情况下,可以考虑执行mergemaster –ai
“跳过询问信息选择全部更新”
提示如下:
www# mergemaster -p
*** Creating the temporary root environment in /var/tmp/temproot
*** /var/tmp/temproot ready for use
*** Creating and populating directory structure in /var/tmp/temproot
*** Beginning comparison
*** Temp ./etc/master.passwd and installed have the same CVS Id, deleting
*** Temp ./etc/group and installed have the same CVS Id, deleting
*** Comparison complete
Do you wish to delete what is left of /var/tmp/temproot? [no] yes
//我选择了yes删除/var/tmp/temproot
//将会有以下显示结果
*** /var/tmp/temproot has been deleted
grep: /etc/make.conf: No such file or directory
*** Comparing make variables
*** From /etc/make.conf
*** From /usr/src/share/examples/etc/make.conf
更新系统配置文件
cd /usr/src
make installworld
mergemaster
shutdown -r now
删除/usr/obj(以防影响下一次编译内核)
cd /usr/obj
chflags -R noschg *
rm -rf *