歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix教程 >> FreeBSD局域網內升級Ports Tree及Port的安裝

FreeBSD局域網內升級Ports Tree及Port的安裝

日期:2017/2/27 17:38:51   编辑:Unix教程
FreeBSD

局域內的FreeBSD系統可以使用以下步驟更新你們的Ports Tree和安裝Port

以下步驟假設你在安裝FreeBSD下已經安裝了Ports
1、修改/etc/make.conf,如果沒有自己創建
MASTER_SITE_OVERRIDE=
ftp://freebsd.csie.nctu.edu.tw/pub/FreeBSD/ports/distfiles/
ftp://ftp.hk.freebsd.org/pub/FreeBSD/ports/distfiles/
ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/
FETCH_ENV=HTTP_PROXY=http://10.67.127.222:808 #針對fetch設proxy
FETCH_ENV=FTP_PROXY=http://10.67.127.222:808 #針對fetch設proxy
2、安裝proxychains
cd /usr/ports/net/proxychains
make install clean
3、配置proxychains
ee /usr/local/etc/proxychains.conf

dynamic_chain
chain_len = 1
quiet_mode
tcp_read_time_out 15000
tcp_connect_time_out 10000
[ProxyList]
http 10.67.127.222 808


4、cvsup (cvsup的配置文件設置就不提了)
proxychains cvsup -g -L 2 ports-supfile



加速ports安裝時的下載速度
可以使用wget、prozilla、axel來加速ports的下載,其中後兩者是多線程的,默認4條線
對於wget
FETCH_CMD=proxychains wget
FETCH_BEFORE_ARGS= -t 1
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes
也可以使用
FETCH_ENV=http_proxy=http://10.67.127.222:808
FETCH_ENV=ftp_proxy=http://10.67.127.222:808

對於prozilla
需要手工修改源代碼,否則遇到找不到文件時需要按任意鍵
將main.c中的getch()一行去掉,www.freebsdchina.org中有說
/* do
{
delay_ms(20);
}
while (getch() == ERR);
*/
make.conf中
FETCH_CMD=proxychains proz -r -t=1 -f --timeout=15
DISABLE_SIZE=yes
同樣也可以使用wget中提到的可選代理方式

對於axel
FETCH_CMD=proxychains axel
FETCH_BEFORE_ARGS= -a
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes
可選代理方式與wget相同

Copyright © Linux教程網 All Rights Reserved