AngusWong's 博客

  • 首页
  • Linux
  • Mac
  • PHP
  • 数据库
  • 路由相关
专注于计算机相关技术分享
  1. 首页
  2. Linux
  3. 正文

PVE8修改软件仓库源和 CT模板(LXC)源为国内源

2025年3月5日 253点热度 0人点赞 0条评论

一、替换apt软件源

替换前先更新下证书,否则可能由于证书不可用导致 https 无法使用,进而无法下载所有软件

sudo apt install apt-transport-https ca-certificates

首先替换通用软件源, Debian 的软件源配置文件是 /etc/apt/sources.list

备份后输入以下命令直接填充

curl -fsSL https://mirrors.ustc.edu.cn/repogen/conf/debian-https-4-bookworm -o  /etc/apt/sources.list

之后替换 pve 软件源

pve 镜像默认的 pve 软件源配置文件是 /etc/apt/sources.list.d/pve-enterprise.list

备份下修改为以下的内容

deb https://mirrors.ustc.edu.cn/proxmox/debian bookworm pve-no-subscription

运行以下指令把软件源的密钥安装一下

wget https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg

编辑 PVE ceph 源 配置文件是 /etc/apt/sources.list.d/ceph.list

把内容修改为:

deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription

最后更新一下软件源

apt update

修改 CT Templates (LXC 容器) 源

将 /usr/share/perl5/PVE/APLInfo.pm 文件中默认的源地址 http://download.proxmox.com

替换为 https://mirrors.tuna.tsinghua.edu.cn/proxmox 即可

sed -ik 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm

针对 /usr/share/perl5/PVE/APLInfo.pm 文件的修改,重启服务后生效

systemctl restart pvedaemon.service

 

标签: CT模板 pve8 国内源 软件源
最后更新:2025年3月5日

Sean

这个人很懒,什么都没留下

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复
分类
  • Linux
  • Mac
  • PHP
  • 其他
  • 前端
  • 数据库
  • 路由相关
最新 热点 随机
最新 热点 随机
macOS Sonoma, macOS Sequoia删除Mac启动台里删不掉的图标 PVE8修改软件仓库源和 CT模板(LXC)源为国内源 Debian12更换国内源 构建宝塔面板Docker镜像 无需root!卸载小米电视/盒子内置应用 检查系统是否被入侵
编译自己的路由器系统Openwrt Docker:docker镜像与容器的导入和导出 Lumen使用JWT用户认证 Debian12更换国内源 Liunx用户和权限相关命令记录 强大的Sed命令

COPYRIGHT © 2021 huangyuqiang.cn. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang