Solution of FreeBSD’s Long Time in Ports Installation

Time:2019-9-11

FreeBSD shortens download time when installing ports

Method A:UseAgent.

In / etc / make. conf, set:
FETCH_ENV= “HTTP_PROXY=IP[: Port]”
If necessary, add a space after the FETCH_ENV value.
HTTP_PROXY_AUTH=basic:*:user:password

Method B: fetch on other machines

make fetch-recursive

Then take / usr / ports / distfiles away.

Method c:UseWGet / Axel speeds up your portdownload

As described belowfunctionAll are implemented by modifying make.conf

For WGet
========
FETCH_CMD= wget
FETCH_BEFORE_ARGS= -c -t 1
FETCH_AFTER_ARGS=
DISABLE_SIZE= yes # This line is necessary, otherwise…

The first three lines can also be replaced by
FETCH_CMD=wget -c -t 1

If you want WGet to penetrate the proxy server, add the following two lines
FETCH_ENV=http_proxy=http://proxy2.zsu.edu.cn:3128
FETCH_ENV=ftp_proxy=http://proxy2.zsu.edu.cn:3128

Or use other traversal agentstoolFor example, proxychains or Socks5 (runsocks)
Then FETCH_CMD = proxychains WGet or runsocks WGet

What? I don’t know what WGet is. Then first
cd /usr/ports/ftp/wget/
make install clean

For Axel
========
Similarly, Axel can be used to replace fetch for multithreaded Downloads
FETCH_CMD=axel
FETCH_BEFORE_ARGS= -a
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes
Or just write one line.
FETCH_CMD=axel -a

Axel penetrates the proxy server in the same way as WGet

Axel at / usr / ports / ftp / Axel

Add Faster Port Download Sites
====================
In addition, add the following two lines to allow make to download port from faster sites first

MASTER_SITE_OVERRIDE= \
ftp://ftp2.tsinghua.edu.cn/mirror/FreeBSD/ports/distfiles/\
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/
This is the setting up of the education network. The brothers of the public network can do it.

Recommended Today

Apple ID Registration (2019.06.02)

Get ready Scientifically surfing the Internet. (The preferred area is United States) Language switch to English. RegionChange toUnited States It’s better to revise the time zone too. It’s no trouble. register iPhoneupperSafariOpen inappleid.apple.comWebsite Slip the bottom to see if the bottom left corner isUnited States。 If it continues. clickCreate your Apple ID Fill in the […]