【原创】如何更新新安装的freeBSD系统?
cvsup介绍:cvsup是John Polstra所编写的用于方便地分发cvs代码库的应用程序;
FreeBSD中的版本分支介绍:RELEASE(发行版)、BETA(测试版)、STABLE或RELENG(稳定版,以维护稳定性及系统安全为主)、CURRENT(当前版,以发展新功能为主),一般有这样的发展顺序:BETE-->RELEASE-->STABLE,CURRENT-->STABLE.
ports介绍:freeBSD中一种安装软件的方式,(略微类似linux下的rpm安装方式),ports没有严格的分支概念,所有版本的FreeBSD都使用同一版本的ports.
1,更新ports:
#cp /usr/share/examples/cvsup/ports-supfile /root
#vi /root/ports-supfile
*default host=CHANGE_THIS.FreeBSD.org更改为-->*default host=cvsup2.FreeBSDchina.org(或cvsup.jp.freebsd.org等)
#cvsup -g -L 2 /root/ports-supfile
2,更新源代码:
#cp /usr/share/examples/cvsup/stable-supfile /root
#vi /root/stable-supfile
*default host=CHANGE_THIS.FreeBSD.org更改为-->*default host=cvsup2.FreeBSDchina.org(或其它合理站点,如cvsup.jp.freebsd.org等)
*default release=cvs tag=RELENG_4更改为-->*default release=cvs tag=RELENG_5(或RELENG_5、RELENG_6等)
#cvsup -g -L 2 /root/stable-supfile
注意:可以把1,2合并成一个文件一起更新ports和源代码(不建议该做法),方法:
#cp /usr/share/examples/cvsup/stable-supfile /root/xxx
*default host=CHANGE_THIS.FreeBSD.org更改为-->*default host=cvsup2.FreeBSDchina.org(或cvsup.jp.freebsd.org等)
*default release=cvs tag=RELENG_4更改为-->*default release=cvs tag=RELENG_5(或RELENG_5、RELENG_6等)
(添加)ports-all tag=.
#cvsup -g -L 2 /root/xxx
3,编译内核:
#cd /usr/src/sys/i386/conf
#cp GENERIC MYKERNEL
#vi MYKERNEL(最基本的修改如下,根据需要可修改其它参数)
machine i386
#cpu I486_CPU
#cpu I586_CPU
cpu I686_CPU
ident MYKERNEL
#cd /usr/src
#make kernel KERNCONF=MYKERNEL(注意:"make kernel KERNCONF=MYKERNEL"[B]=[/B]"make buildkernel KERNCONF=MYKERNEL"+"make installkernel KERNCONF=MYKERNEL")
#reboot
#uname -a(发现系统已经更新为xxx.xxx.stable,注意对比更新前的该显示)