Debian 9(代号为 Stretch),镜像源已由原来的jessie更新为了stretch,为了安全起见需要先备份,再进行配置新的镜像源。修改debian9镜像源方法如下:
1、备份原有镜像源配置文件: cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、打开sources.list文件,注释原有CD源代码,更新镜像源地址为163镜像源,代码如下:
代码语言:javascript复制deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
配置完毕之后输入:apt update 命令更新系统镜像源配置文件。