vi .cshrc
插入一行
setenv PACKAGESITE http://ftp.twaren.net/BSD/FreeBSD/ports/i386/packages-6-stable/Latest/
source .cshrc
2. 安裝本地化套件
pkg_add -vr zh-auto-tw-l10n
cp /usr/local/share/skel/zh_TW.Big5/make.conf /etc/
cp /usr/local/share/skel/zh_TW.Big5/dot.cshrc ./.cshrc
vi .cshrc
檔案更動過,重新插入
setenv PACKAGESITE http://ftp.twaren.net/BSD/FreeBSD/ports/i386/packages-8-stable/Latest/
source .cshrc
rehash
3. 視個人喜好安裝慣用編輯器
pkg_add -vr pico-alpine
rehash
4. 編輯 /etc/make.conf
尋找並修改如下:
# 設定國內的 distfiles mirror sites
MASTER_SITE_BACKUP?= \
http://ftp.twaren.net/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup10.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup6.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
http://cvsup.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
5. 安裝 cvsup 套件
pkg_add -vr cvsup-without-gui
rehash
6. 複製 cvsup 範例檔
cp /usr/share/examples/cvsup/ports-supfile .
cp /usr/share/examples/cvsup/stable-supfile .
尋找最快的 cvsup 站台
fastest_cvsup -c tw
編輯這兩個檔,把 CHANGE_THIS 指定到較快的站台
範例如下:
*default host=cvsup6.tw.FreeBSD.org
7. 執行 cvsup
cvsup -g -L 2 ~/ports-supfile
cvsup -g -L 2 ~/stable-supfile
8. 安裝 portupgrade 套件
6.2版的話,請如下安裝
cd /usr/ports/ports-mgmt/portupgrade
make install clean
rehash
9. 執行 ports tree 更新
重建 ports index
portsdb -Uu
修補關聯性
pkgdb -uF
測試升級
portupgrade -ayn
OK的話就正式GO!!!
portupgrade -ay
10. 編輯 /usr/local/etc/pkgtools.conf
找到
MAKE_ARGS = {
}
改為
MAKE_ARGS = {
'www/apache22' => 'WITHOUT_WWW=yes',
'lang/php5' => 'WITH_APACHE=yes',
'lang/perl5.8' => 'ENABLE_SUIDPERL=1',
'databases/mysql51-server' => 'BUILD_OPTIMIZED=yes',
}
接著就可以安裝 apache + php + mysql !!!
MySQL (ex. 5.1)
cd /usr/ports/databases/mysql51-server/
make WITH_CHARSET=utf8 BUILD_OPTIMIZED=yes BUILD_STATIC=yes install clean
Apache 2.2
cd /usr/ports/www/apache22/
make install clean
PHP 5
cd /usr/ports/lang/php5/
make install clean
cd /usr/ports/lang/php5-extensions/
make install clean
編輯 /etc/rc.conf
pico /etc/rc.conf
加上以下:
# MySQL
mysql_enable="YES"
mysql_dbdir="/usr/local/mysql"
# Apache
apache22_enable="YES"
沒有留言:
張貼留言