通过FetchDebian加速Debian安装的核心是利用本地缓存减少下载时间,步骤如下:
安装FetchDebian
sudo apt update && sudo apt install fetchdebian。配置镜像源
/etc/fetchdebian.conf,指定离你最近的镜像源(如国内USTC镜像),例如:mirror = "https://mirrors.ustc.edu.cn/debian/"。同步软件包到本地缓存
sudo fetchdebian sync,将所需软件包同步到本地目录(默认/var/cache/fetchdebian)。sudo crontab -e,添加0 2 * * * /usr/bin/fetchdebian sync。修改安装脚本
执行安装
注意:FetchDebian主要用于加速安装阶段的软件包下载,安装完成后建议定期更新系统(sudo apt update && sudo apt upgrade)以获取最新补丁。