VNC服务端部署手册
1. 首先是桌面GUI环境
#GNOME为例
yum groupinstall “GNOME Desktop”
2. VNC 服务器
yum install tigervnc-server
yum -y install xrdp
#查看rdp是否安装成功
systemctl start xrdp.service
#检查rdp的端口
netstat -antup | grep xrdp
#如果不成功,查看日志:/var/log/message, 若类似Failed at step EXEC spawning /usr/sbin/xrdp-sesman: Permission denied
chcon -t bin_t /usr/sbin/xrdp /usr/sbin/xrdp-sesman
#系统启动后自动运行
systemctl enable xrdp.service
3. 新添加一个可以远程访问的用户
useradd unisound
passwd unisound
4. 为用户单独创建一个VNC服务配置
#‘1’ 是 配置命名,第二个用户可以是2,以此类推
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
vim /etc/systemd/system/vncserver@:1.service
#或者 gedit /etc/systemd/system/vncserver@:1.service
替换文件中 为新建的用户 unisound
#编辑 vncservers
vim