安装VNCServer
yum -y install vnc vnc-server
设置密码
vncserver
You will require a password to access your desktops.
Password: 123456 #输入vnc 连接密码
Verify: 123456 #确认vnc密码
xauth: creating new authority file /root/.Xauthority
New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
启动服务
启动一个窗口,如1号窗口
vncserver :1
停止服务
[root@iZ23zjkwlj8Z ~]# vncserver -kill :1
Killing Xvnc process ID 1661
安装GNOME桌面
装完后记得重启下vncserver
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
二客户端
客户端http://www.realvnc.com/,下载对应平台的VNC-Viewer
输入IP:窗口号,ok登录成功
防火墙
firewall-cmd --permanent --add-service vnc-server
systemctl restart firewalld.service
网友评论