今天,我分享下自己在Debian10.x系统下手动安装Proxmox VE 6.x的经过,供大家参考,有不完善的地方还请大家多多指教,因为我也玩的时间不长。下面上教程:
1. Debain10.x系统修改apt源为aliyun
mv /etc/apt/sources.list /etc/apt/sources.list.bak && vi /etc/apt/sources.list
deb https://mirrors.aliyun.com/debian/ buster main non-free contrib
deb https://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ buster/updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian-security/ buster/updates main non-free contrib
2. 更新系统
apt-get update -y && apt-get upgrade -y
3. 同步时间
timedatectl set-timezone Asia/Shanghai
# 设置时区
systemctl start systemd-timesyncd
# 自动同步时间
4. 设置主机名
hostnamectl set-hostname dcs-edge1.pealog.com
echo "192.168.1.1 pea-edge1.pealog.com pea-edge1" | tee -a /etc/hosts
5. bash: sudo: command not found报错
apt install sudo -y
6. dpkg-source报错
apt install dpkg-dev vim -y
7. 更换SSH端口(也可不变)
sed -i 's%#Port 22%Port 66%' /etc/ssh/sshd_config
systemctl restart sshd
8. 安装Porxmox VE 6.x
(1) 添加PVE相关的apt下载库
wget -qO - https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-ve-release-6.x.gpg | apt-key add -
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription" | tee /etc/apt/sources.list.d/pve-install-repo.list
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-nautilus buster main" | tee /etc/apt/sources.list.d/ceph.list
apt-get update -y && apt-get upgrade -y && apt-get install -y gnupg2
(2) 安装Proxmox VE软件包
apt install proxmox-ve postfix open-iscsi ksmtuned ceph-base -y
(3)配置postfix
选择Internet Site,其他配置选择默认。
dpkg-reconfigure postfix
9. 重启 使用PVE内核
reboot
10. 配置PVE 6源
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription" >> /etc/apt/sources.list
#echo "deb http://download.proxmox.wiki/debian/pve stretch pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
#echo 'deb http://download.proxmox.wiki/debian/pve stretch pve-no-subscription' >> /etc/apt/sources.list.d/pve-no-subscription.list
11. 删除企业源
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
12. 关闭PVE6 订阅提醒
sed -i_orig "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/js/pvemanagerlib.js
说明:此处修改前先要备份一份文件,之前我就是在第一次修改不成功后导致系统错误,无法加载界面信息,只能重新安装一遍PVE,最保险的方法是使用手工修改:
vi /usr/share/pve-manager/js/pvemanagerlib.js
打开文件后,找到以下部分代码
if (res === null || res === undefined || !res || res.data.status.toLowerCase() !== 'active') {...}
修改为:
if (false) {...}
最后,用以下命令重启PVE即可。
systemctl restart pveproxy.service
以上就是Debian10.x系统环境下安装PVE(Proxmox VE) 6.x 的详细方法,亲测有效。
(文章参考来源:https://www.cnblogs.com/surplus/p/14391801.html)