Linux 安装配置远程桌面连接

一. 桌面环境安装

  1. 如果没有安装图形化界面,则先安装。已安装直接跳过
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 安装远程桌面

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值