配置前请先参考:
https://wiki.debian.org/SourcesList
https://www.debian.org/mirror/list
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
http://mirrors.ustc.edu.cn/help/debian.html
官方镜像地址:
ftp.cn.debian.org #中科大
ftp2.cn.debian.org #清华
nano /etc/apt/sources.list
deb http://ftp.cn.debian.org/debian stretch main
deb http://ftp.cn.debian.org/debian-security stretch/updates main
deb http://ftp.cn.debian.org/debian stretch-updates main
使用https地址,可以有效避免国内运营商的缓存劫持
以清华大学地址为例:
apt install apt-transport-https
nano /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
#backports请按需使用
#deb https://mirrors.tuna.tsinghua.edu.cn/debian stretch-backports main contrib non-free
#buster请按需使用
#deb https://mirrors.tuna.tsinghua.edu.cn/debian buster main
https://backports.debian.org
使用backports安装应用:
apt -t stretch-backports install ...
若要使用https源,则需要执行apt-get install apt-transport-https,再执行apt-get update更新索引。
2.常用站点列表
163镜像站
| 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 |
中科大镜像站
| deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free |
清华大学镜像站
| deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free |
阿里云镜像站
| deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb http://mirrors.aliyun.com/debian-security stretch/updates main deb-src http://mirrors.aliyun.com/debian-security stretch/updates main deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib |
兰州大学镜像站
| deb http://mirror.lzu.edu.cn/debian stable main contrib non-free |
上海交大镜像站
| deb https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free deb-src https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free deb https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free deb-src https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free deb https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free deb-src https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free deb https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free deb-src https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free |
华为镜像站
deb https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free deb https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free deb https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free deb-src https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free |
本文详细介绍了如何配置Debian系统的镜像源,包括官方镜像及多个国内镜像站点,如中科大、清华、163、阿里云等。通过使用https地址,可以有效避免国内运营商的缓存劫持,确保软件包的安全下载。
1235

被折叠的 条评论
为什么被折叠?



