FreeBSD replace domestic sources

After installing the first thing is to replace domestic sources, or later to install the desktop and other domestic sources useless too slow.

Modify the source pkg

mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf

# content of FreeBSD.conf
FreeBSD:{
    url: "pkg+http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly",
}

#完成后,可以pkg install axel试试效果(axel下面修改ports源时里面会用的的一个小工具)
如果没安装成功,从提示上看是系统时间跟网站时间不一致,比如我是19年10月30日23:30,你根据你的时间更改运行date命令调整系统时间:date 1910302330
之后再次安装axel,应该就可以成功了。

Modify portsnap source

ee /etc/portsnap.conf

# content of porsnap.conf
SERVERNAME=porsnap.tw.freebsd.org

#之后运行 portsnap fetch,获取或更新ports架构;
因为是第一次用portsnap,之后还需要:portsnap extract
之后portsnap update;
以后更新ports,就直接portsnap fetch update就可以了。

Modify the source ports

ee /etc/make.conf

# content of make.conf
FETCH_CMD=axel -n 30 -a   #-n 30 表示使用30个线程下载
DISABLE_SIZE=yes
MASTER_SITE_OVERRIDE?=http://mirrors.ustc.edu.cn/freebsd-ports/distfiles/${DIST_SUBDIR}/

#安装ports升级工具portmaster试试效果:
# cd /usr/ports/ports-mgmt/portmaster
# make install clean
 
## portmaster is a ports upgrade tool, using basically used:
portmaster -a



 

Guess you like

Origin www.cnblogs.com/liujingli1986/p/11774738.html