如何配置Debian 12的本地国内源?
- By : Will
- Category : Debian-Like
Debian-Like
1 前言
一个问题,一篇文章,一出故事。
笔者安装Debian 12系统感觉国外的源太慢,于是需要手动配置国内源,因此整理此文。
2 最佳实践
2.1 屏蔽系统默认源
sed -i "s/^deb/#deb/g" /etc/apt/sources.list
2.2 配置应用源
cat > /etc/apt/sources.list.d/aliyun.list << EOF deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free 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 contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib EOF
2.3 配置驱动源
cat > /etc/apt/sources.list.d/firmware.list << EOF deb http://mirrors.163.com/debian/ bookworm main non-free-firmware deb-src http://mirrors.163.com/debian/ bookworm main non-free-firmware deb http://mirrors.163.com/debian/ bookworm-updates main non-free-firmware deb-src http://mirrors.163.com/debian/ bookworm-updates main non-free-firmware deb http://security.debian.org/debian-security bookworm-security main non-free-firmware deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware EOF
参阅文档
=================
https://developer.aliyun.com/mirror/debian/?spm=a2c6h.25603864.0.0.1e7129e8nqGlUU
没有评论