6.1、需求场景:
1、希望使用windows远程访问centos图形界面,使用xmanager连接centos远程桌面时有以下问题:
(1)只能有一个用户同时使用xmanger连接远程桌面,多个用户同时登录不行。
(2)centos上,因为gnome硬件加速的原因,导致Xdmcp不可用,而基于xdmcp的xmanager
也就无法使用了。
(3)如果直接使用VNC,配置又相对麻烦一些。而且还要在windows上安装一个RealVNC软件。
我们希望找到一个配置简单,连接方便的方案。所以这里使用XRDP服务器。
2、环境:
windows10 操作系统。
centos7.5 Gnome 桌面操作系统。
6.2、服务器设置:
1、安装epel源:
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# yum clean all
2、关闭防火墙:
# systemctl stop firewalld
# systemctl disable firewalld
3、关闭selinux:
# vim /etc/selinux/config
SELINUX=disabled
# setenforce 0
6.3、安装xrdp:
# yum install xrdp -y
修改xrdp最大连接数,默认值为32,不修改也可以:
# vim /etc/xrdp/xrdp.ini
max_bpp=32
启动xrdp并加入开机自启动:
# systemctl start xrdp.service
# systemctl enable xrdp.service
# netstat -tunlp | grep xrdp
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 2082/xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 2081/xrdp-sesman
6.4、使用mstsc连接centos桌面:
1、win徽标键+R 键调出"运行":
2、输入远程ip地址:
3、输入centos系统中存在的用户名和密码:
4、连接成功:
6.5、使用MobaXterm连接centos桌面:
1、配置连接:
2、输入连接密码:
3、连接成功: