- 服务器安装图形化桌面:
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
ln-sf/libsystemdsystemrunlevel5.targetetcdefault.target
reboot -
安装vnc-server包:yum install tigervnc-server
-
useradd work
- cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
- vi /etc/systemd/system/vncserver@:1.service
-
关闭防火墙:
-
[root@vhost ~]# systemctl stop firewalld
[root@vhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
-
设置密码:
[root@vhost ~]# su - work
[work@vhost ~]$ vncserver
You will require a password to access your desktops.
Password: -
Verify:
xauth: file /home/work/.Xauthority does not exist
New 'vhost:1 (work)' desktop is vhost:1
Creating default startup script /home/work/.vnc/xstartup
Starting applications specified in /home/work/.vnc/xstartup
Log file is /home/work/.vnc/vhost:1.log
su - systemctl daemon-reload systemctl enable vncserver@:1.service reboot systemctl start vncserver@:1.service