当前位置: 移动技术网 > 科技>操作系统>Unix > FreeBSD局域网内升级Ports Tree及Port的安装

FreeBSD局域网内升级Ports Tree及Port的安装

2018年03月16日  | 移动技术网科技  | 我要评论

局域内的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相同
 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网