Last Update: 2003年 1月27日 周一 04時50分10秒 CST
Contributed by Gea-Suan Lin <gslin@ccca.nctu.edu.tw>
在安裝軟體前,最好先更新 Ports Tree, 建議先由安裝光碟中選擇 Ports Collection 先安裝好後, 再來更新 Ports Tree,這樣子更新的時間會比較短。
接著設定好 /etc/make.conf (若沒有則自行建立)。
SUP_UPDATE= yes SUP= /usr/local/bin/cvsup SUPFLAGS= -g -L 2 # # SUPHOST 代表要到哪台 CVSup,請改成離您比較近的 Server。 # cvsup[1-9].tw.FreeBSD.org SUPHOST= cvsup.tw.FreeBSD.org # # 如果您是用 -stable,請用 stable-supfile (目前的 -stable 是 4.3) # 如果您是用 -current,請用 standard-supfile (目前的 -current 是 5.0) SUPFILE= /usr/share/examples/cvsup/stable-supfile PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile # 國內主要的 FreeBSD distfiles mirror 站台 MASTER_SITE_BACKUP?= \ ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp2.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp8.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp9.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
簡體的使用者則是修改 SUPHOST 和 MASTER_SITE_BACKUP:
SUPHOST= ftp.freebsdchina.org MASTER_SITE_BACKUP?= \ ftp://ibm.tju.edu.cn/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\ ftp://ftp.freebsd.org.cn/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\ ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
Note: 可以安裝 sysutils/fastest_cvsup 來檢察那一個 cvsup 最適合您,安裝完後修改 /usr/local/bin/fastest_cvsup, 把台灣的個數 'tw' => 3, # Taiwan 改成 'tw' => 13, # Taiwan, 然後執行 fastest_cvsup -c tw。
安裝好基本的 Ports Tree 後,安裝 net/cvsup-without-gui。
接著就可以進行更新了:
# cd /usr/ports # make update
如果不打算改 /etc/make.conf,也可以依照下面的方式:
# cvsup -g -L 2 -h cvsup.tw.freebsd.org /usr/share/examples/cvsup/ports-supfile