首先,我们要安装apt-mirror
$sudo apt-get install apt-mirror
假设我们将镜像等文件放在 /service/Ubuntu文件夹下:
请事先新建以下文件夹(mirror.list里面提示要我们事先新建文件夹的):
/service/ubuntu
/service/ubuntu/mirror
/service/ubuntu/skel
/service/ubuntu/var
配置apt-mirror:
$sudo vi /etc/apt/mirror.list
--------------------------------------------------------------
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# 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
#我们添加或更改如下内容:
set base_path /service/ubuntu
set mirror_path $base_pa