第一步,打开终端,安装VNC packages:
yum install tigervnc-server
第二步,修改配置信息,在/etc/systemd/system/下建立文件夹vncserver@:1.service 把example config 文件从/lib/systemd/system/vncserver@.service复制到里面
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
PS:因为我之前弄过所以多了一步rm删除操作
第三步,打开这个配置文件/etc/systemd/system/vncserver@:1.service替换掉默认用户名,我直接用root 用户登录,所以我替换成root,如下
第四步,为VNC设密码(密码输入也不显示,Verify是密码确定,再输一遍)
vncpasswd
第五步,设默认启动并开启VNC
systemctl start vncserver@:1.service
systemctl enable vncserver@:1.service
windows端的VNC就可以连了,IP地址:端口