2.16. CentOS7安装xrdp(windows远程桌面连接linux)

2.16.1. Centos7 上安装xrdp

2.16.2. 前提:

CentOS安装桌面,如果无桌面,请执行:
yum -y groups install "GNOME Desktop"  startx

2.16.3. 安装xrdp

cp -rf /etc/yum.repos.d/CentOS-Base.repo{,.bak}
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo   #更换阿里源国内源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo           #改为aliyun的epel源,先备份epel本身的源
yum clean all
yum makecache

yum --enablerepo=epel -y install xrdp

启动xrdp并设置开机启动

systemctl start xrdp
systemctl enable xrdp

安装好了之后将防火墙关闭,或者开放3389端口

//开放3389端口
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload


//或者关闭防火墙//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld

自动安装脚本

install_xrdp.sh

#!/bin/sh
yum grouplist
yum -y install epel-release && yum -y groupinstall Xfce
yum -y install xrdp
cd
echo "xfce4-session" > ~/.Xclients
chmod +x .Xclients
sed -i "s/ssl_protocols=/; ssl_protocols=/g" /etc/xrdp/xrdp.ini
sed -i "58i ssl_protocols=TLSv1, TLSv1.3, TLSv1.1, TLSv1.2, TLSv3" /etc/xrdp/xrdp.ini
systemctl start xrdp && systemctl enable xrdp
firewall-cmd --add-port=3389/tcp --zone=public --permanent
firewall-cmd --reload
curl ifconfig.me
reboot

2.16.4. Ubuntu18.04 上安装 Xrdp 远程桌面服务

https://www.linuxidc.com/Linux/2019-08/159848.htm

2.16.5. Ubuntu 20.04 上安装 Xrdp 服务器

https://blog.csdn.net/snowdream86/article/details/106311024

参考相关文献:

CentOS安装noVNC,以Web方式交付VNC远程连接