Debian 双栈网络时开启 IPv4 优先
sed -i 's/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/' /etc/gai.conf
sed -i 's/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/' /etc/gai.conf
[FIXED] Repository ‘http://security.debian.org/debian-security buster/updates InRelease’ changed its ‘Suite’ value from ‘stable’ to ‘oldstable’
运行一次下面代码就好了
apt-get update --allow-releaseinfo-change
首先设置hostname,根据实际情况自行修改,我这里设置为freenn
hostnamectl set-hostname freenn
修改/etc/hosts,添加如下内容
127.0.0.1 localhost.localdomain localhost
8.8.8.8 freenn.proxmox.com freenn
8.8.8.8为你服务器公网IP,请自行修改
如果你的hostname设置为freenn,那么必须设置域名为freenn.proxmox.com,同理如果hostname设置为test,则域名为test.proxmox.com
如果是安装pve8,且版本为bookworm,则添加如下源
echo "deb https://mirrors.apqa.cn/proxmox/debian/pve bookworm port">/etc/apt/sources.list.d/pveport.list
如果是安装pve7,且系统版本为debian11,则添加如下源
echo "deb https://mirrors.apqa.cn/proxmox/debian/pve bullseye port">/etc/apt/sources.list.d/pveport.list
添加apt-key
curl https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg
安装Proxmox VE
使用正确的path
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
安装Proxmox VE
apt update && apt install -y proxmox-ve
apk add zerotier-one
/etc/init.d/zerotier-one -d
zerotier-one -d
rc-update add zerotier-one sysinit
最后加入网络 zerotier-cli join
编辑 /etc/pve/nodes/freenn/lxc 路径里的conf文件,在文件最下方添加代码
PVE5开TUN代码
lxc.cgroup.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
PVE6.4开TUN代码
lxc.cgroup.devices.allow: c 10:200 rwm
lxc.hook.autodev = sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"
PVE7.4开TUN代码
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file