FreeBSD更换源

https://help.mirrors.cernet.edu.cn/FreeBSD/

https://help.mirrors.cernet.edu.cn/FreeBSD-pkg/

https://help.mirrors.cernet.edu.cn/FreeBSD-ports/

 

背景
在使用FreeBSD时,安装工具由于网络问题很容易出现随时中断且耗时较长的问题。为了解决该问题尝试进行国内源替换。

修改pkg源
用户自定义源:
mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD.conf
# FreeBSD.conf的内容

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

 

修改 ports 源
vi /etc/make.conf

# content of make.conf
FETCH_CMD=axel -n 10 -a
DISABLE_SIZE=yes
MASTER_SITE_OVERRIDE?=http://mirrors.ustc.edu.cn/freebsd-ports/distfiles/${DIST_SUBDIR}/

 

pkg更新
pkg update

 

来源:https://blog.csdn.net/xie__peng/article/details/129280246

 

posted @ 2025-04-30 00:17  profesor  阅读(265)  评论(0)    收藏  举报