debian系统更换软件源镜像优化国内下载速度


debian系统更换软件源镜像提高国内下载速度呢?

使用国内小众云主机经常会遇到的问题,下载更新软件速度慢。如果预装系统没有根据位置选择合适软件源镜像,建议手动修改debian软件源镜像以加快速度。所以,Debian使用国外镜像源,在国内使用会造成更新软件慢或者找不到等问题,装完系统,应对软件源进行设置,改为国内源,下载速度就变快。本文将指导新手用户更换软件源,希望对用户有所帮助。

国内debian软件源镜像

列出几个常用国内 Debian软件源镜像。点此可查看完整镜像节点。

镜像节点镜像地址
Debianhttp://ftp.cn.debian.org/debian/
阿里云http://mirrors.aliyun/debian/
华为云http://mirrors.aliyun/debian/
网易http://mirrors.163/debian/
清华大学http://mirrors.tuna.tsinghua.edu.cn/debian/
中国科大http://mirrors.ustc.edu.cn/debian/
兰州大学http://mirror.lzu.edu.cn/debian/

更换Debian软件源镜像

在操作前,先重命名备份软件源配置文件,以便在需要时可以还原。

mv /etc/apt/sources.list /etc/apt/sources.list.bak

创建新的配置文件。

vi /etc/apt/sources.list

内容如下(通常只需按需修改其中发行版代号和镜像地址,详细查看后面备注介绍)。

deb http://ftp.cn.debian.org/debian/ buster main contrib non-free

deb-src http://ftp.cn.debian.org/debian/ buster main contrib non-free

deb http://ftp.cn.debian.org/debian-security/ buster/updates main contrib non-free

deb-src http://ftp.cn.debian.org/debian-security/ buster/updates main contrib non-free

deb http://ftp.cn.debian.org/debian/ buster-updates main contrib non-free

deb-src http://ftp.cn.debian.org/debian/ buster-updates main contrib non-free

deb http://ftp.cn.debian.org/debian/ buster-backports main contrib non-free

deb-src http://ftp.cn.debian.org/debian/ buster-backports main contrib non-free

逐个介绍配置内容里的参数含义:

deb:二进制软件包;

deb-src:源代码软件包;

网址:软件包镜像地址;

发行版代号:适用对应发行版的软件包,可用 lsb_release -c 命令查询代号名称;

发行版代号跟随参数:软件包类型(xxxxx/updates 安全错误更新,xxxxx-updates 普通维护更新,xxxxx-backports 向后移植软件包,将较新软件补丁移植到旧版软件上);

main:遵循 DFSG 标准的自由软件;

contrib:遵循 DFSG 标准的自由软件,但存在 non-free 依赖;

non-free:不符合 DFSG 标准的软件;

更新配置文件后重建软件包索引生效。

apt-get update

如果你用的是 https 软件源镜像地址,那么需要确保已安装下面两个软件。

apt-get install apt-transport-https ca-certificates


上一篇:如何提交百度新闻源?百度新闻源申请方法步骤

下一篇:腾讯云本地专用集群CDC正式发布:解决企业本地云、边缘云、传统IDC上云问题


Copyright © 2002-2019 测速网 www.inhv.cn 皖ICP备2023010105号
测速城市 测速地区 测速街道 网速测试城市 网速测试地区 网速测试街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!

热门搜索 城市网站建设 地区网站制作 街道网页设计 大写数字 热点城市 热点地区 热点街道 热点时间 房贷计算器