分类: BSD
2008-05-05 08:33:25
cp /etc/defaults/make.conf /etc/ vi /etc/make.conf |
將:
# Port master sites. # # If you want your port fetches to go somewhere else than the default # (specified below) in case the distfile/patchfile was not found, # uncomment this and change it to a location nearest you. (Don't # remove the "/${DIST_SUBDIR}/" part.) # #MASTER_SITE_BACKUP?= \ # ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ # # If you want your port fetches to check the above site first (before # the MASTER_SITES specified in the port Makefiles), uncomment the # line below. You can also change the right side to point to wherever # you want. # #MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP} # |
改為:
# Port master sites. # # If you want your port fetches to go somewhere else than the default # (specified below) in case the distfile/patchfile was not found, # uncomment this and change it to a location nearest you. (Don't # remove the "/${DIST_SUBDIR}/" part.) # MASTER_SITE_BACKUP?= \ ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp10.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://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}/\ ftp://ftp11.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp12.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ # # If you want your port fetches to check the above site first (before # the MASTER_SITES specified in the port Makefiles), uncomment the # line below. You can also change the right side to point to wherever # you want. # MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP} # |
上述站台的排列原則是,哪一台的網路連線與您的網路環境最佳者,排在第一個。
抓檔案時,如果第一台抓不到,會依序向第二台詢問有沒有。如果都問完了,還是沒有,就會到國外的原始站台去抓。不過,這種情形應該很少見到。
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 cd /usr/ports/security/sudo ; make install clean cd /usr/ports/shells/bash2 ; make install clean cd /usr/ports/ftp/ncftp3 ; make install clean cd /usr/ports/mail/imap-uw ; make install clean cd /usr/ports/mail/qpopper ; make install clean cd /usr/ports/security/pidentd ; make install clean cd /usr/ports/misc/gnuls ; make install clean |
pkg_info autoconf-2.13_1 Automatically configure source code on many Un*x platforms bash-2.05 The GNU Bourne Again Shell gettext-0.10.35 GNU gettext package gettext-0.10.38 GNU gettext package gmake-3.79.1 GNU version of 'make' utility isc-dhcp3-3.0.r11 ISC Dynamic Host Configuration Protocol client and server code libiconv-1.7_1 A character set conversion library libtool-1.3.4_2 Generic shared library support script m4-1.4 GNU's m4 ncftp3-3.0.3 ftp replacement with advanced user interface pidentd-2.8.5 An RFC1413 identification server qpopper-4.0.3_1 Berkeley POP 3 server (now maintained by Qualcomm) wget-1.7_3 Retrieve files from the 'net via HTTP and FTP |
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: qpopper-4.0.3_1 Path: /usr/ports/mail/qpopper Info: Berkeley POP 3 server (now maintained by Qualcomm) Maint: lioux@FreeBSD.org Index: mail ipv6 B-deps: autoconf-2.13_1 m4-1.4 R-deps: |
cd /usr/ports make search key="libiconv" | grep Path: | grep libiconv |
cd /usr/ports fetch cvsup -g -L 2 cvsupfile-ports |
而在苗栗縣網中,以FreeBSD 4.6-RELEASE至NCTU更新ports,只花費了00:05:00。
這個更新的內容預設值是全部的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 |
portsdb -Uu
pkgdb -F
portupgrade -aWy
備註:執行 portsdb -Uu 時,會有令人覺得當機的味道。別耽心,耐心的稍等一下下就好。
MAKE_ARGS = {
'databases/mysql323-*' => 'WITH_CHARSET=big5',
'databases/mysql323-*' => 'SKIP_INSTALL_DB=yes',
'databases/phpmyadmin' => 'MYADMDIR?=www/data/phpMyAdmin',
'www/apache13' => 'WITH_APACHE_SUEXEC=yes',
}
mysql 安裝時,預設不支援中文;而phpMyAdmin預設的安裝路徑則在www/data.default/phpMyAdmin,與apache不同,害我裝了之後找好久才找到。
這只是舉例,更詳細的安裝選項,請查看每個 PORTS 中的 Makefile 檔案。
Duplicated origin: sysutils/portupgrade - portupgrade-20020706 portupgrade-20020805
Unregister any of them? [no] yes
Unregister portupgrade-20020706 keeping the installed files intact? [no] no
pkg_info | grep portupgrade
portupgrade-20020429 Very powerful FreeBSD ports/packages upgrading tool and mor
grep \PORTVERSION= /usr/ports/sysutils/portupgrade/Makefile
PORTVERSION= 20020805
portupgrade -o /usr/ports/sysutils/portupgrade portupgrade-20020429
pkg_info | grep portupgrade
portupgrade-20020805 Very powerful FreeBSD ports/packages upgrading tool and mor
之後卻發現,新版的 perl 好像「誰都不認識」
因此,如果原本的系統跑得好好的,卻突然啥事都不對勁,大概就是和 perl 的升級有關。
其實,只要使用 portupgrade 就可解決此一問題。
portupgrade -f perl-5.8.\* -m "ENABLE_SUIDPERL=yes"
rehash
use.perl port
portupgrade \
-m "-DFORCE_PKG_REGISTER" \
-rf perl-5.8.\* \
-x perl-5.8.\* \
-l /tmp/portupgrade.log
說明:
-f "perl-5.8.*"
強迫更新,就算版本號碼相同,也會將 perl 重新編譯一次。
-m "ENABLE_SUIDPERL=yes"
在 make 時送出 ENABLE_SUIDPERL=yes 的參數,這個參數值在配合 openwebmail 使用時特別需要,否則 openwebmail 會 error
ps. 此部份的參數與值,建議寫入 pkgtools.conf 中。若是,則可省略此參數。
-r "perl-5.8.*"
把相依於 perl-5.8 的軟體一起更新
到底有多少軟體相依於 perl 呢?天知道,我一點概念也沒有,就讓 portupgrade 幫我做吧!
每一個ports都有專人負責,其更新也是非常迅速,這兒有第一手資料。