更改仓库源(初始化)

noteId: 595C84817AE64C41A865DC70CC9CC316 · 原始路径:/ALL/Linux - A模块/服务配置/初始化-网络服务、时区、镜像源、切换语言环境/更改仓库源(初始化).note

自动扫描镜像:

使用apt-cdrom命令自动扫描ISO镜像内存并建立连接:#apt-cdrom add使用apt工具查找软件包:#apt search apache2使用apt工具安装软件包:#apt install apache2

手动挂载镜像:

镜像源从网上找高速镜像

#apt install apt-transport-https ca-certificates
#vim /etc/apt/sources.list

清华大学镜像源:

默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-freedeb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-freedeb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free# deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bull`seye-security main contrib non-free# # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-freedeb http://security.debian.org/debian-security bullseye-security main contrib non-free# deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

阿里云镜像源:

deb https://mirrors.aliyun.com/debian/ bullseye main non-free contribdeb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contribdeb https://mirrors.aliyun.com/debian-security/ bullseye-security maindeb-src https://mirrors.aliyun.com/debian-security/ bullseye-security maindeb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contribdeb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contribdeb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contribdeb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

debian 12.0 自带的仓库源:

#deb cdrom:[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 NETINST with firmware 20230610-10:21]/ bookworm main non-free-firmwaredeb http://deb.debian.org/debian/ bookworm main non-free-firmwaredeb-src http://deb.debian.org/debian/ bookworm main non-free-firmwaredeb http://security.debian.org/debian-security bookworm-security main non-free-firmwaredeb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware# bookworm-updates, to get updates before a point release is made;# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backportsdeb http://deb.debian.org/debian/ bookworm-updates main non-free-firmwaredeb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware# This system was installed using small removable media# (e.g. netinst, live or single CD). The matching "deb cdrom"# entries were disabled at the end of the installation process.# For information about how to configure apt package sources,# see the sources.list(5) manual.