一. 桌面环境安装
- 如果没有安装图形化界面,则先安装。已安装直接跳过
yum -y groups install "GNOME Desktop"
二. 远程服务设置
1. Windows 远程登录需要安装 Xrdp,需要 epel 源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y xrdp
如果使用yum源安装时可能会出现
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存: 28 M RSS (444 MB VSZ)
已启动: Mon Sep 28 20:10:04 2020 - 00:04之前
状态 :睡眠中,进程ID:18298
解决方案:杀掉yum进程
rm -f /var/run/yum.pid
2. Xrdp 会调用 VNC,安装 tigervnc-server
yum install -y tigervnc-server
3. 修改 Xrdp 最大连接数(默认貌似就是32,视情况而定)
vim /etc/xrdp/xrdp.ini
max_bpp=32
4. 启动 Xrdp 并设置开机启动
systemctl start xrdp
systemctl enable xrdp
5. 开放 3389 端口,或者关闭防火墙
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
6. 关闭防火墙
systemctl stop firewalld
7. 禁止防火墙开机启动
systemctl disable firewalld
8. 远程连接即可
详细安装和VNC客户端连接可参考:CentOS7 安装远程桌面