FreeBSD

FreeBSD 保持最新的 Ports Tree
  • 1# JDP
  • 930712005-5-9 18:27:19
在安裝軟體前,最好先更新 Ports Tree, 建議先由安裝光碟中選擇 Ports Collection 先安裝好後, 再來更新 Ports Tree,這樣子更新的時間會比較短。

接著設定好 /etc/make.conf (若沒有則自行建立)
  1. SUP_UPDATE= yes
  2. SUP= /usr/local/bin/cvsup
  3. SUPFLAGS= -g -L 2
  4. #
  5. # SUPHOST 代表要到哪台 CVSup,請改成離您比較近的 Server。
  6. # cvsup[1-9].tw.FreeBSD.org
  7. SUPHOST= cvsup.tw.FreeBSD.org
  8. #
  9. # 如果您是用 -stable,請用 stable-supfile (目前的 -stable 是 4.3)
  10. # 如果您是用 -current,請用 standard-supfile (目前的 -current 是 5.0)
  11. SUPFILE= /usr/share/examples/cvsup/stable-supfile
  12. PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
  13. DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile
  14. # 國內主要的 FreeBSD distfiles mirror 站台
  15. MASTER_SITE_BACKUP?= @@\@@
  16. ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  17. ftp://ftp2.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  18. ftp://ftp3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  19. ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  20. ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  21. ftp://ftp7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  22. ftp://ftp8.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
  23. ftp://ftp9.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}
  24. MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
  25. # 在此我是安裝 XFree86-4
  26. XFREE86_VERSION= 4
複製代碼
Note: 可以安裝 sysutils/fastest_cvsup 來檢查那一個 cvsup 最適合你,安裝完後修改 /usr/local/bin/fastest_cvsup, 把台灣的個數 'tw' => 3, # Taiwan 改成 'tw' => 13, # Taiwan, 然後執行 fastest_cvsup -c tw。

安裝好基本的 Ports Tree 後,安裝 cvsup-without-gui:

# cd /usr/ports/net/cvsup-without-gui
# make install clean

接著就可以進行更新了:

# cd /usr/ports
# make update
倒序瀏覽 看全部 全部回復1
  • 2# JDP
  • 2008-4-2 11:09:19

使用csup更新port tree

FreeBSD 6.2 RELEASE之後的版本,已將csup納入預設的套件中,所以不需要再安裝cvsup了!

# vi /etc/make.conf
  1. SUP_UPDATE= yes
  2. SUP= /usr/bin/csup
  3. SUPFLAGS= -g -L 2
  4. #
  5. # SUPHOST 代表要到哪台 CVSup,請改成離您比較近的 Server。
  6. # cvsup[1-9].tw.FreeBSD.org
  7. SUPHOST= cvsup.tw.FreeBSD.org
  8. #
  9. # 如果您是用 -stable,請用 stable-supfile (目前的 -stable 是 4.3)
  10. # 如果您是用 -current,請用 standard-supfile (目前的 -current 是 5.0)
  11. SUPFILE= /usr/share/examples/cvsup/stable-supfile
  12. PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
  13. DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile
複製代碼
更新ports tree
  1. # cd /usr/ports
  2. # make update
複製代碼
//更新src
  1. # cd /usr/src
  2. # make update
複製代碼
回復 收藏 轉播 分享 淘帖