debian

如何通过FetchDebian加速Debian安装

小樊
39
2025-09-11 12:28:30
栏目: 智能运维

通过FetchDebian加速Debian安装的核心是利用本地缓存减少下载时间,步骤如下:

  1. 安装FetchDebian

    • 使用APT安装:sudo apt update && sudo apt install fetchdebian
    • 或从GitHub克隆手动安装。
  2. 配置镜像源

    • 编辑配置文件/etc/fetchdebian.conf,指定离你最近的镜像源(如国内USTC镜像),例如:
      mirror = "https://mirrors.ustc.edu.cn/debian/"
  3. 同步软件包到本地缓存

    • 运行sudo fetchdebian sync,将所需软件包同步到本地目录(默认/var/cache/fetchdebian)。
    • 可设置定时任务(如每天凌晨2点)自动同步:sudo crontab -e,添加0 2 * * * /usr/bin/fetchdebian sync
  4. 修改安装脚本

    • 在Debian安装介质的启动菜单中选择“Advanced options”,进入安装脚本配置界面,指定使用FetchDebian的本地缓存路径。
  5. 执行安装

    • 启动安装程序,系统会优先从本地缓存读取软件包,减少网络下载时间。

注意:FetchDebian主要用于加速安装阶段的软件包下载,安装完成后建议定期更新系统(sudo apt update && sudo apt upgrade)以获取最新补丁。

0
看了该问题的人还看了