>第一次取得ports tree
- vi /etc/portsnap.conf
- 修改(改成較近較快)SERVERNAME=portsnap.FreeBSD.org改成 portsnap.tw.freebsd.org
- portsnap fetch
- Looking up portsnap.freebsd.org mirrors… 5 mirrors found.
Fetching snapshot tag from portsnap5.FreeBSD.org… done.
Fetching snapshot metadata… done.
Fetching snapshot generated at Tue Feb 15 08:11:54 CST 2011:
6894de6c5ce6ec6f3d8edb291e78cfb62c96f77a944887100% of 64 MB 57 kBps 00m00s
Extracting snapshot… done.
Verifying snapshot integrity… done.
Fetching snapshot tag from portsnap5.FreeBSD.org… done.
Fetching snapshot metadata… done.
Updating from Tue Feb 15 08:11:54 CST 2011 to Tue Feb 15 14:03:00 CST 2011.
Fetching 3 metadata patches.. done.
Applying metadata patches… done.
Fetching 0 metadata files… done.
Fetching 22 patches…..10….20. done.
Applying patches… done.
Fetching 1 new ports or files… done. - portsnap extract (解壓)
- portsnap update
- cp /usr/share/examples/cvsup/stable-supfile /usr/local/etc
- pkg_delete -a -f (刪除所有套件)
使用方式
- cd /usr/ports;make update (先取得最新的port tree)
- make search name=sudo (找軟體,看在哪個目錄)
- cd /usr/ports/security/sudo;make install clean (進去該目錄,編譯/安裝/清除 編譯檔)
- rehash
第一次裝好FreeBSD必灌ports
- lang/perl5.10 :PERL,vmware tools也會用到,安裝時除了debug以外都全選
- chinese/telnet :預設內建的telnet連中文bbs只會送7bits,所以有個telnet叫 zh-telnet,用學長的csh.cshrc會發現telnet的 alias叫zh-telnet
- security/sudo :安裝時候用預設選項即可,要ldap的再選ldap
- editors/vim-lite :內建的vi不太好用,所以還是裝一下vim加強版,這個會順便安裝python2.6
- ports-mgmt/portupgrade :ports管理昇級移除程式。
- sysutils/screen :可以同時在一個ssh遠端開好幾個tty畫面,就算你桌機斷掉,screen也會掛著。