CentOS8安装VNC
步骤 1)安装 GNOME 桌面环境dnf groupinstall "workstation"
或
dnf groupinstall "Server with GUI
成功安装上面的包后,请运行以下命令启用图形模式:
systemctl set-default graphical
reboot
重启后,请取消注释 /etc/gdm/custom.conf 中的 WaylandEnable=false,以使通过 vnc 进行的远程桌面会话请求由 GNOME 桌面的 xorg 处理,来代替 Wayland 显示管理器。
步骤 2)安装 VNC 服务器(tigervnc-server)
dnf install tigervnc-server tigervnc-server-module -y
vncpasswd
cp /usr/lib/systemd/user/[email protected] /etc/systemd/system/vncserver@:1.service
WorkingDirectory=/root
User=root
Group=root
systemctl daemon-reload
systemctl start vncserver@:1.service
systemctl enable vncserver@:1.service
systemctl status vncserver@:1.service
firewall-cmd --permanent --add-port=5901/tcp
firewall-cmd --reload
页:
[1]