一,安装准备
安装准备根据自己使用情况修改好。
1.设置主机名
hostnamectl set-hostname pve.example.com --static
2.设置hosts
rm /etc/hosts
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost ip6-localhost ip6-loopback" >> /etc/hosts
echo "ff02::1 ip6-allnodes" >> /etc/hosts
echo "ff02::2 ip6-allrouters" >> /etc/hosts
echo "xx.xx.xx.xx pve.example.com pve" >> /etc/hosts
3.安装必要软件
apt update -y
apt install wget curl sudo nano unzip -y
二,设置安装源
1.调用官方源
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
调用国内源(自行选择)
echo "deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
wget https://mirror.tuna.tsinghua.edu.cn/proxmox/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
2.安装推荐内核
apt update -y && apt full-upgrade -y
apt install proxmox-default-kernel -y
3.重启一下
systemctl reboot
三,安装PVE
1.直接安装
apt install proxmox-ve postfix open-iscsi -y
安装过程中根据自己的需要选择是否安装mail服务,不安装的话选择第一个。
安装完成后,使用https://ip:8006,账号密码是root用户,进不去请查看防火墙是否开放。
2.安装后的处理
#去除网络文件锁
chattr -i /etc/network/interfaces
#清除多余内核
sudo apt-get remove --purge $(dpkg --list | grep linux-image | awk '{print $2}' | grep -v "$(uname -r)")
#清除多余软件包
apt remove open-iscsi -y
apt autoremove -y
#持久化iptables
apt install iptables-persistent -y
国内ct源
cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back
sed -i 's|http://download.proxmox.com|https://mirrors.tuna.tsinghua.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm
评论0
暂时没有评论