close

用Ports的方式安裝基本的應用軟體。而FreeBSD原則上會到各應用軟體的總站臺下載原始程式後才編譯、安裝,如此速度上會顯得很慢。因此,我們必須設定FreeBSD只需到交大資工系(或者是臺灣地區其他的mirror站)來抓取原始程式碼即可。



在安裝6.0-RELEASE完以後.再/etc/內新增make.conf


vi /etc/make.conf


內容如下


MASTER_SITE_BACKUP?=    \
       ftp://freebsd.csie.ncu.edu.tw/FreeBSD/ports/distfiles/${ DIST_SUBDIR }/ \
       ftp://freebsd.csie.nctu.edu.tw/pub/distfiles/${ DIST_SUBDIR }/
MASTER_SITE_OVERRIDE?=  ${ MASTER_SITE_BACKUP }
# added by use.perl 2006-01-13 10:23:25





上述站台的排列原則是,哪一台的網路連線與您的網路環境最佳者,排在第一個。



抓檔案時,如果第一台抓不到,會依序向第二台詢問有沒有。如果都問完了,還是沒有,就會到國外的原始站台去抓。不過,這種情形應該很少見到。


開始用Ports安裝應用軟體:


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

cd /usr/ports/sysutils/portupgrade ; make install clean

cd /usr/ports/ftp/wget ; make install clean






其中,cvsup-without-gui 與 portupgrade 是屬於系統更新( src 及 ports-tree )的工具軟體,建議您一定要裝。


查看安裝之後的結果:

pkg_info

大海撈針:搜尋某一ports

cd /usr/ports

make search key="popper" | more  

cd /usr/ports

make search key="libiconv" | grep Path: | grep libiconv  

Port:   qpopper-2.53_2

Path:   /usr/ports/mail/popper

Info:   Berkeley POP 3 server (now maintained by Qualcomm)

Maint:  ache@freebsd.org

Index:  mail

B-deps:

R-deps:

Port:軟體名稱,Path:路徑,Info:訊息,Maint:維護者,Index:類型。

cd /usr/ports

make search key="libiconv" | grep Path: | grep libiconv  


ports-tree的更新

切換目錄 至 /usr

cd /usr/


取得PORTS設定檔

wget http://jc104.idv.tw/ports-supfile


執行PORTS跟新


/usr/cvsup -g -L 2  /usr/ports-supfile

 

慢慢等吧.少說1小時.




這個更新的內容預設值是全部的ports,所需耗費的時間相對就很長。您可以只選擇其中的一部份來更新即可,只要改cvsupfile-ports檔案最底下的那一行(ports-all)。 ports-base: /usr/ports/... misc files at the top of /usr/ports

ports-archivers: /usr/ports/archivers archiving tools

ports-audio: /usr/ports/audio sound support

ports-benchmarks: /usr/ports/benchmarks benchmarks

ports-cad: /usr/ports/cad CAD tools

ports-comms: /usr/ports/comms communication software

ports-databases: /usr/ports/databases databases

ports-devel: /usr/ports/devel development utilities

ports-editors: /usr/ports/editors editors

ports-emulators: /usr/ports/emulators emulators for other OSes

ports-games: /usr/ports/games games

ports-graphics: /usr/ports/graphics various graphics utilities

ports-japanese: /usr/ports/japanese Japanese software.

ports-lang: /usr/ports/lang programming languages

ports-mail: /usr/ports/mail mail software

ports-math: /usr/ports/math numerical computation software

ports-misc: /usr/ports/misc miscellaneous utilities

ports-net: /usr/ports/net networking software

ports-news: /usr/ports/news USENET news software

ports-plan9: /usr/ports/plan9 various programs from Plan9

ports-print: /usr/ports/print printing software

ports-russian: /usr/ports/russian Russian software

ports-security: /usr/ports/security ``security'' utilities, for better or for worse

ports-shells: /usr/ports/shells various UN*X shells

ports-sysutils: /usr/ports/sysutils system utilities

ports-www: /usr/ports/www software related to the world wide web

ports-x11: /usr/ports/x11 X11 software



其他:

make install : 安裝所選定的 Port

make deinstall : 移除已安裝的 Port

make reinstall : 移除之後再安裝一次

make clean : 安裝完畢後移除 make 資料夾下的檔案

make distclean : 移除安裝後的原始檔案,以節省磁碟空間



make install

make install clean

make install clean distclean

全站熱搜
創作者介紹
創作者 garyliuh 的頭像
garyliuh

沉溺於網海中的痞子

garyliuh 發表在 痞客邦 留言(0) 人氣()