1,查看系统版本信息

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

2,安装 VNC Server

[root@localhost ~]# dnf install -y tigervnc-server tigervnc-server-module

3,复制配置文件

[root@localhost ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

4,添加用户

[root@localhost ~]# vim /etc/tigervnc/vncserver.users
# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa

:1=root

5,初始化

[root@localhost ~]# systemctl daemon-reload

6,创建 vncviewer 登录密码

[root@localhost ~]# vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

7,启动 vncserver

[root@localhost ~]# systemctl start vncserver@:1.service
[root@localhost ~]# systemctl enable vncserver@:1.service
[root@localhost ~]# systemctl status vncserver@:1.service

8,VNC Viewer 登录