PVE更换国内源

废话不多说,只贴出我更换好的国内源的配置文件

安装vim

apt install vim -y

proxmox源

root@pve04:/etc/apt/sources.list.d# mv pve-enterprise.list /root/
root@pve01:/etc/apt/sources.list.d# vim pve-no-subscription.list 
deb https://mirrors.ustc.edu.cn/proxmox/debian/pve stretch pve-no-subscription

debian官方源

root@pve04:/etc/apt# mv sources.list /root/
root@pve01:/etc/apt# vim  sources.list

deb http://chinanet.mirrors.ustc.edu.cn/proxmox/debian/pve stretch pve-no-subscription

 
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
 
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
 
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
 

关于ceph源我要说几句

ceph源即使你更换之后还是会自动给你换回官方源的,所以这里需要使用nginx反向代理一下才可以。

[root@website_nginx-28 conf.d]# vim pve.conf 
server {
        listen       80;
        server_name  download.proxmox.com;
        index        index.html index.htm;
    location /debian/ceph-luminous {
        proxy_pass http://mirrors.ustc.edu.cn/proxmox/debian/ceph-luminous;
    }
  }

配置pve服务器的host文件如下

root@pve01:/etc/apt# vim /etc/hosts
10.2.2.28 download.proxmox.com

执行apt update查看是否有报错

发表评论

后才能评论