工具: XRDP, GNOME
centos8:
# 1. 安装GNOME(如安装略过):
dnf groupinstall "Server with GUI"
# 2. 安装XRDP RDP server
dnf install epel-release # 设置epel源
dnf install xrdp
# 3. 启动xrdp
systemctl enable xrdp # 开机启动
systemctl start xrdp
systemctl status xrdp # 检查是否启动
# 4. 设置xrdp
sudo vim /etc/xrdp/xrdp.ini
# 在末尾增加以下一行
exec gnome-session
# 重启
systemctl restart xrdp
# 5. 检查连接端口监听状态
netstat –atnp | grep 3389
firewall-cmd --add-port = 3389/tcp -- permanent # 设置防火墙
firewall-cmd –reload # 自动重载
# 6. win10通过远程桌面连接登录
打开远程桌面连接,输入centos主机的ip地址(IP地址可以通过ip a | grep 192获得, 也可以通过设置查看wifi或有线网络的ipv4地址)
输入centos主机的root用户和密码
成功连接!
待解决问题:
1. 尝试使用非root用户登录, 连接失败;
2. 如果不通过图像界面, 怎么远程连接。