Debian:Linux系统更换镜像源
·
李光春
Debian系统版本:12
自动更换镜像源
建议更换前执行 更换时间脚本
自动更换脚本 自写(Debian12)
bash <(wget --no-check-certificate -qO- https://cdn.dtapp.net/linux/debian-change-source.sh)
自动更换脚本 宝塔写的第三方
bash <(wget --no-check-certificate -qO- https://cdn.dtapp.net/linux/fix_source.sh)
建议更换后执行 系统更新脚本
手动更换镜像源 deb-src=源码仓库
apt install apt-transport-https ca-certificates
手动更换为 阿里云镜像站
编辑 /etc/apt/sources.list
文件
# https://developer.aliyun.com/mirror/debian
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
手动更换为 腾讯云镜像站
编辑 /etc/apt/sources.list
文件
# https://mirrors.cloud.tencent.com/help/debian.html
deb https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian-security bookworm-security main
deb-src https://mirrors.cloud.tencent.com/debian-security bookworm-security main
deb https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
手动更换为 华为云镜像站
编辑 /etc/apt/sources.list
文件
# https://mirrors.huaweicloud.com/mirrorDetail/5ea14e0757bdf83a14170fdf?mirrorName=debian&catalog=os%2Flogin
deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
deb-src https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
手动更换为 火山引擎镜像站
编辑 /etc/apt/sources.list
文件
# https://developer.volcengine.com/articles/7275535526869155859
deb https://mirrors.volces.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.volces.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.volces.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.volces.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.volces.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.volces.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb https://mirrors.volces.com/debian-security/ bookworm-security main
deb-src https://mirrors.volces.com/debian-security/ bookworm-security main
手动更换为 校园网联合镜像站(mirrorz-302 智能选择)
编辑 /etc/apt/sources.list
文件
# https://help.mirrors.cernet.edu.cn/debian/?mirror=CERNET
deb https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware