1.安装vncserver
yum install -y tigervnc-server.x86_64
2.修改vnc配置文件
cd /lib/systemd/system
cp vncserver@.service vncserver@:1.service
vim vncserver@:1.service
将<USER> 修改为root
3.给root用户创建vnc密码
vncpasswd root
4.启动vnc服务
systemctl enable --now vncserver@:1.service
5.禁用防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
6.使用vnc客户端连接