实验环境: CentOS 7.5 模拟给两个用户 jerry、tom 配置vnc
Note:这个不安全,最好加上SSL/TLS
Unlike in previous Red Hat Enterprise Linux distributions, TigerVNC
in Red Hat Enterprise Linux 7 uses the systemd
system management daemon for its configuration. The /etc/sysconfig/vncserver
configuration file has been replaced by /etc/systemd/system/vncserver@.service
.
1. Installing VNC Server
To install the TigerVNC server, issue the following command as root
[root@vm-server ~]# yum install tigervnc-server
2. Configuring VNC Server
The VNC server can be configured to start a display for one or more users, provided that accounts for the users exist on the system, with optional parameters such as for display settings, network address and port, and security settings.
- A configuration file named
/etc/systemd/system/vncserver@.service
is required. To create this file, copy the/usr/lib/systemd/system/vncserver@.service
file asroot
:
[root@vm-server ~]# cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-jerry@.service
[root@vm-server ~]# cp /usr/lib/system