网上的不大合适,重新开搞。pve7、Debian11和12都可以,下面换源时要改下。特别说:
不要使用特权容器!!!不要使用特权容器!!!不要使用特权容器!!!
会卡!
cat <<'EOF' > /etc/apt/sources.list # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # # deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware EOF #直接一个命令合集安装了。这里也回开启rdp服务,在pve控制台中,安装了桌面环境也不会显示的。安装过程会提示一次选择键盘布局,其它等装完就行,装好会弹出编码选项 apt update && apt upgrade -y && apt install -y xfce4 xfce4-goodies xorg dbus-x11 fcitx5 fcitx5-chinese-addons ttf-wqy-microhei xrdp && systemctl enable xrdp && systemctl start xrdp && dpkg-reconfigure locales #启用以下编码,zh_CN UTF-8,默认使用zh_CN UTF-8即可,进入就是中文环境。不用各种骚添加操作,真不用 #可能你还想添加一个非root用户,看这里 apt install sudo -y adduser l sudo usermod -aG sudo l