Loading... # CentOS安装远程桌面通过Windows远程桌面RDP mstsc 直接访问 ## 一、添加阿里云源 ``` rm -rf /etc/yum.repos.d/* curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo ``` 上述的原地址 http://mirrors.aliyun.com/repo/ 可打开后安装对应系统版本的 repo 。 ## 二、安装桌面 GUI 环境 安装桌面 GUI 环境,可参考我博客另一篇文章 [Centos8 GUI图形界面的安装、切换与卸载](https://blog.dwtowen.com/archives/284/) ### 默认启动桌面环境后以 root 用户自动登录 修改配置文件 ``` vim /etc/gdm/custom.conf ``` 增加如下配置 ``` [daemon] AutomaticLoginEnable=True AutomaticLogin=root ``` ## 三、远程服务设置 ``` # Windows 远程登录需要安装 Xrdp,需要 epel 源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-8.repo yum install -y xrdp # Xrdp 会调用 VNC,安装 tigervnc-server yum install -y tigervnc-server # 修改 Xrdp 最大连接数 vim /etc/xrdp/xrdp.ini max_bpp=32 # 启动 Xrdp 并设置开机启动 systemctl start xrdp systemctl enable xrdp # 开放 3389 端口,或者关闭防火墙 firewall-cmd --permanent --zone=public --add-port=3389/tcp firewall-cmd --reload # 关闭防火墙 systemctl stop firewalld # 禁止防火墙开机启动 systemctl disable firewalld ``` ## 四、远程连接 打开 Windows 的远程桌面   直接输入需要登录的用户名和密码即可登录远程桌面。 End Thanks!!😂 最后修改:2021 年 03 月 16 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏
3 条评论
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-8.repo
--2021-04-10 15:12:54-- http://mirrors.aliyun.com/repo/epel-8.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 47.246.4.143, 47.246.4.144, 47.246.4.145, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|47.246.4.143|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-04-10 15:12:57 ERROR 404: Not Found.
你是没先安装 aliyun 源吧。
rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
有安装的,看提示是 http://mirrors.aliyun.com/repo/epel-8.repo地址失效了?