如何配置Debian 12的本地国内源?

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

没有评论

发表回复

Debian-Like
如何配置Ubuntu的默认桌面?

1 前言 本章针对Ubuntu的系统环境配置VNC,如有需要请参阅下文。 2 实践部分 2.1 安装 …

Debian-Like
如何部署Debian sublime-text平替notepad++

1 前言 一个问题,一篇文章,一出故事。 办公系统环境早已放弃使用Windows客户端系统,因此需要 …

Debian-Like
如何部署Ubuntu Apache Directory Studio?

1 前言 一个问题,一篇文章,一出故事。 由于笔者需要访问LDAP服务器,所以需要安装一个LDAP的 …