以Jessie为例, 编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份)
1 2 3 4 5 6 7 8 |
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 |
如果是Debian 9 (代号为 Stretch),镜像源已由原来的jessie更新为了stretch,为了安全起见需要先备份,再进行配置新的镜像源。修改debian9镜像源方法如下:
1、备份原有镜像源配置文件:
1 |
cp /etc/apt/sources.list /etc/apt/sources.list.bak |
2、打开sources.list文件,注释原有CD源代码,更新镜像源地址为163镜像源,代码如下:
1 2 3 4 5 6 7 8 |
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 |
3、更新源:
1 |
apt update |
或者下载相应版本的sources.list, 覆盖/etc/apt/sources.list即可(操作前请做好相应备份)
来自参考:http://mirrors.163.com/.help/debian.html
声明: 本文由( 小天 )原创编译,转载请保留链接: 国内云服务器 Debian 系统替换成 163 的源
------====== 本站公告 ======------
欢迎使用趣域网域名百科,我们将长期提供域名使用相关知识和投资域名的方法和技巧;并提供主机、服务器的解决问题和网站运营方法。