1#准备网络环境(你懂的网络),将域名proxmox.com添加到强制代理名单里
2#若安装时未设置DNS,请先设置DNS(如已设置过请忽略此步骤)
echo "nameserver 223.5.5.5" >> /etc/resolv.conf
或
echo "nameserver 114.114.114.114" >> /etc/resolv.conf
3#删除企业源和中文社区源
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
rm -rf /etc/apt/sources.list.d/pve-install-repo.list
4#添加中文社区源
echo "deb http://download.proxmox.wiki/debian/pve bullseye pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
echo "deb http://download.proxmox.wiki/debian/ceph-octopus bullseye main" > /etc/apt/sources.list.d/ceph.list
中文社区源抽风的时候,改回Proxmox官方源
echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
5#修改为国内源(选其一即可)
- 阿里云源
cat >/etc/apt/sources.list<<'EOF'
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb https://mirrors.aliyun.com/debian-security bullseye-security main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian-security bullseye-security main contrib non-free
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
EOF
- 腾讯云源
cat >/etc/apt/sources.list<<'EOF'
deb https://mirrors.cloud.tencent.com/debian/ bullseye main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ bullseye-updates main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ bullseye-backports main contrib non-free
deb https://mirrors.cloud.tencent.com/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ bullseye main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian-security bullseye-security main contrib non-free
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
EOF
6#升级到最新系统和内核
apt-get update && apt-get upgrade && apt-get dist-upgrade -y
升级后重启一下,才能删除旧内核
7#移除 Proxmox VE 旧版内核
a) 安装 pvekclean
apt update && apt -y install git && rm -rf ./pvekclean/ && git clone https://hub.fastgit.org/jordanhillis/pvekclean.git && cd pvekclean && chmod +x pvekclean.sh && ./pvekclean.sh
或
apt update && apt -y install git && rm -rf ./pvekclean/ && git clone https://github.com/jordanhillis/pvekclean.git && cd pvekclean && chmod +x pvekclean.sh && ./pvekclean.sh
b) 运行 pvekclean执行删除
pvekclean -f
8#升级8215B驱动
realtek-r8125-dkms_9.005.06-1_amd64.deb
-安装 dkms 和 pve-headers
apt-get install dkms pve-headers
-通过 WinSCP 等 SFTP 软件把驱动安装包上传至 PVE 的 /tmp 文件夹
dpkg -i /tmp/realtek-r8125-dkms_9.005.06-1_amd64.deb
(此处文件名请根据实际自行更改)
9#调整服务器时间(调整后PVE联网几分钟会自动更新时间)
nano /etc/systemd/timesyncd.conf
[修改时间time ntp]
NTP=ntp1.aliyun.com cn.ntp.org.cn
10#移除 Proxmox VE 无有效订阅提示(可操作可不操作)
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service