Http://ltyluck.blog.51cto.com/170459/420944
Create a file without make. conf:
CD/etc/
VI make. conf
Add the following content:
Master_site_freebsd_org = ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/%SUBDIR%/
Master_site_gnome = http://mirrors.geekbone.org/gnome/%SUBDIR%/
Master_site_local = ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/%SUBDIR%/
Master_site_override = ftp://ftp.cn.freebsd.org/pub/freebsd/ports/distfiles/##dist_subdir }/
As a result, the ports will be updated and downloaded directly from servers in China.
Finally, we use Axel for multi-thread download for ports. If you do not know the location of Axel in ports, you can run the following command to find it:
# Cd/usr/Ports
# Make search key = Axel
Port: axel-1.0b
Path:/usr/ports/FTP/Axel
Info: A Download Accelerator
Maint: ports@FreeBSD.org
B-deps: gettext-0.14.5_2 gmake-3.81_1 libiconv-1.9.2_2
R-deps: gettext-0.14.5_2 libiconv-1.9.2_2
Www: http://wilmer.gaast.net/main.php/axel.html
In fact, another more convenient method is whereis.
# Whereis Axel
Axel:/usr/ports/FTP/Axel
Start Installation directly
# Cd/usr/ports/FTP/Axel
# Make install clean
After the installation is complete, go to make. conf to set the axel.
# Ee/etc/make. conf
Join:
Fetch_cmd = Axel
Fetch_before_args =-N 10-
Fetch_after_args =
Disable_size = Yes
Compiled in this wayProgramThe execution efficiency is significantly improved.