PVE更换源

PVE更换源有什么用呢?因为国内网络的情况,有些地方的网络可能无法连接Debian的网站,想要更新或安装一些软件时就会因为无法连接网络而无法安装,所以我们要把PVE的软件源更换为Debian设在国内的服务器,这样就能连接Debian源了。

更换源

备份源文件。

				
					cp /etc/apt/sources.list /etc/apt/sources.list.backup
				
			

分别执行以下添加国内服务器。

				
					cat <<EOF > /etc/apt/sources.list
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
				
			
				
					echo "deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
				
			
屏蔽企业源
				
					sed -i 's/^deb https:\/\/enterprise.proxmox.com\/debian\/pve/#deb https:\/\/enterprise.proxmox.com\/debian\/pve/' /etc/apt/sources.list.d/pve-enterprise.list
				
			

屏蔽ceph源。

				
					sed -i 's/^deb https:\/\/enterprise.proxmox.com\/debian\/ceph-quincy/#deb https:\/\/enterprise.proxmox.com\/debian\/ceph-quincy/' /etc/apt/sources.list.d/ceph.list
				
			

或者在PVE里将这以下两个源禁用即可。

0 0 投票数
文章评分
订阅评论
提醒
guest
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
请允许我展示5秒,打个小广告

有两台闲置设备,用不到了,有需要的兄弟可以看一下。

新手没玩过的可以技术支持。

NAS
六盘位,支持2.5/3.5硬盘,CPU:i3-8100T,支持硬件解码.8G内存,可以安装黑群晖,飞牛等其它NAS系统。
点击这里
软路由
N100小主机,4个2.5网口,16G内存,256GSSD,超低功耗公耗仅6W,可以做软路由、NAS,PVE、虚拟机,ESXI等。
点击这里
Previous slide
Next slide
0
希望看到您的想法,请您发表评论!x