现在大部分服务端应用都是运行在Linux上的,所以使用Linux操作系统来开发应用会方便很多(用Mac的用户请自动跳过)。
(1)安装软件并启动
#yum groupinstall "X Window System" -y
……
#yum groupinstall -y "GNOME Desktop" -y
……
#yum install -y epel-release
……
#yum install -y xrdp
……
#systemctl enable xrdp
……
#systemctl start xrdp
……
该安装过程需要较长时间,请耐心等待。
(2)验证安装结构
[root@ecs-5cd4 ~]# systemctl status xrdp
xrdp.service - xrdp daemon
Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-11-25 10:24:55 CST; 4s ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Main PID: 29431 (xrdp)
Tasks: 1
CGroup: /system.slice/xrdp.service
└─29431 /usr/sbin/xrdp --nodaemo
(3)通过Windows 的远程连接终端,连接远程桌面。
冒号后面的端口是默认的,如果要修改其他端口,直接编辑/etc/xrdp/xrdp.ini。 然后重启xrdp服务 : systemctl restart xrdp。
[root@ecs-5cd4 ~]# systemctl status xrdp -l
xrdp.service - xrdp daemon
Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-11-25 10:29:24 CST; 13s ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Main PID: 29481 (xrdp)
Tasks: 1
CGroup: /system.slice/xrdp.service
└─29481 /usr/sbin/xrdp --nodaemon
Nov 25 10:29:24 ecs-5cd4 systemd[1]: Started xrdp daemon.
Nov 25 10:29:24 ecs-5cd4 xrdp[29481]: (29481)(140118529112512)[INFO ] starting xrdp with pid 29481
Nov 25 10:29:24 ecs-5cd4 xrdp[29481]: (29481)(140118529112512)[INFO ] address [0.0.0.0] port [23389] mode 1
Nov 25 10:29:24 ecs-5cd4 xrdp[29481]: (29481)(140118529112512)[INFO ] listening to port 23389 on 0.0.0.0
Nov 25 10:29:24 ecs-5cd4 xrdp[29481]: (29481)(140118529112512)[INFO ] xrdp_listen_pp done