PVE 8 更换 apt 国内源的方法[清华源]
清华源信息
官方网站
https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/
更换流程
备份源文件
#
cp /etc/apt/sources.list /etc/apt/sources.list.bak
替换源文件
# debian 12 源 cat > /etc/apt/sources.list << EOF deb http://mirrors.ustc.edu.cn/debian/ bookworm main non-free-firmware deb-src http://mirrors.ustc.edu.cn/debian/ bookworm main non-free-firmware deb https://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib deb http://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free-firmware deb-src http://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free-firmware EOF
# pve 软件原 cat > /etc/apt/sources.list.d/pve-no-subscription.list << EOF deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription EOF
关闭自动更新
生产系统自动更新容易遇到不可预知的问题,正常需要关闭自动更新,按需手动更新
关闭方法
systemctl disable --now pve-daily-update.timer
开启方法
systemctl enable --now pve-daily-update.timer
PVE8.x基于debian12默认的慢,用第三方仓库更新podman版本
仓库配置添加仓库
echo 'deb http://download.opensuse.org/repositories/home:/alvistack/Debian_12/ /' | tee /etc/apt/sources.list.d/home:alvistack.list
配置gpg key
curl -fsSL https://download.opensuse.org/repositories/home:alvistack/Debian_12/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/home_alvistack.gpg > /dev/null
安装podman
apt update && apt install -y podman netavark
验证安装
podman version