概述
使用 apt-mirror 作为镜像源
安装apt-mirror
apt-get install apt-mirror
vi /etc/apt/mirror.list
############# config ##################
# 这里可以改路径
# set base_path
/var/spool/apt-mirror
set base_path
/aptdata/apt-mirror
# 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
set nthreads
20
set _tilde 0
#
############# end config ##############
#deb http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-src http://ftp.us.debian.org/debian unstable main contrib non-free
# mirror additional architectures
#deb-alpha http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-amd64 http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-armel http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-hppa http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-i386 http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-ia64 http://ftp.us.debian.org/debian unstable main contrib non-free
#deb-m68k http://ftp.us.debian.org/debian unstable main contrib non-free
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
执行命令
apt-mirror
nginx 配置文件
server {
listen
80;
server_name
x.x.x.x;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/apt-mirror/mirror/mirrors.163.com/;
}
}
客户端的配置文件
自己搭建的源,安装的时候报
WARNING: The following packages cannot be authenticated!
在源里面增加
[trusted=yes] 安装的时候就不会有警告了
deb [trusted=yes] http://x.x.x.x/debian/ jessie main non-free contrib
最后
以上就是稳重雪碧为你收集整理的debian jessie 搭建镜像源:方法一使用 apt-mirror 作为镜像源的全部内容,希望文章能够帮你解决debian jessie 搭建镜像源:方法一使用 apt-mirror 作为镜像源所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复