freebsd在安装ports时缩短下载时间
方法a: 使用。
在/etc/make.conf中设置:
fetch_env= "http_proxy=ip[:端口]"
如果需要,在fetch_env值后面加入空格,
http_proxy_auth=basic:*:user:password
方法b: 在其它机器上fetch
make fetch-recursive
...
然后将/usr/ports/distfiles拿走。
方法c:使用wget/axel加速你的port下载
以下所述功能均通过修改make.conf实现
对于wget
========
fetch_cmd= wget
fetch_before_args= -c -t 1
fetch_after_args=
disable_size=yes #这行是必要的,否则...
前面3行也可以换成
fetch_cmd=wget -c -t 1
如果你要wget穿透服务器,请加上下面两行
fetch_env=http_proxy=http://proxy2.zsu.edu.cn:3128
fetch_env=ftp_proxy=http://proxy2.zsu.edu.cn:3128
或者使用其他的穿越工具例如proxychains 或者socks5(runsocks)
则fetch_cmd=proxychains wget或者runsocks wget
什么?不知道wget是什么?那就先
cd /usr/ports/ftp/wget/
make install clean
对于axel
========
同样,也可以使用axel来替换fetch来进行多线程下载
fetch_cmd=axel
fetch_before_args= -a
fetch_after_args=
disable_size=yes
或者只写一行
fetch_cmd=axel -a
axel 穿透服务器的方法与wget一致
axel在/usr/ports/ftp/axe
发表评论