注意:同步镜像需要约500G磁盘空间
# 解压文件
unzip apt-mirror-master.zip
# 将apt-mirror-master 移动到 /opt 目录
mv apt-mirror-master /opt/apt-mirror
创建同步镜像配置
/etc/apt/mirror.list
############# config ##################
# 镜像存放位置
set base_path /var/spool/apt-mirror/ubuntu/20.04/
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
# 下载线程数,默认20
set nthreads 20
set _tilde 0
#
############# end config ##############
deb https://mirror.nju.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirror.nju.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirror.nju.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirror.nju.edu.cn/ubuntu/ focal-security main restricted universe multiverse
#
clean https://mirror.nju.edu.cn/ubuntu
MariaDB 10.5 镜像
/etc/apt/mariadb.mirror.list
############# config ##################
#
set base_path /va