Window10 RDP远程CentOS

1、最新小话安装的同学,需要安装桌面,因为vnc server要基于桌面化;

[root@locust ~]# yum -y install epel-release
[root@locust ~]#yum -y groups install "GNOME Desktop"

2、关闭selinux(不会设置行为上下文的,还是关闭吧!) 和 防火墙(为了安全,允许开放端口即可,如果是内网环境,可以考虑关闭)

复制代码
[root@locust ~]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      6646/Xvnc            
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd           
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1582/master         
tcp6       0      0 ::1:5910                :::*                    LISTEN      6646/Xvnc           
tcp6       0      0 ::1:3350                :::*                    LISTEN      22324/xrdp-sesman   
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd           
tcp6       0      0 :::8089                 :::*                    LISTEN      8363/python3        
tcp6       0      0 ::1:25                  :::*                    LISTEN      1582/master         
tcp6       0      0 :::3389                 :::*                    LISTEN      22325/xrdp  
复制代码
复制代码
[root@locust ~]# getenforce 
Permissive
[root@locust ~]# setenforce 0
永久关闭selinux编辑selinux文件enforcing 改成 disabled
[root@locust ~]# cat  /etc/sysconfig/selinux   
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 
复制代码

3、安装xrdp和vnc server ,启动、开启自启动、查看服务是否起来

[root@locust ~]#yum -y install tigervnc-server xrdp
[root@locust ~]#systemctl start xrdp
[root@locust ~]#systemctl enable xrdp
[root@locust ~]#systemctl status xrdp

4、查看是否正常

 

 注意:测试Windows10、11远程正常,其他Windows没有测试。

posted @   袁与张  阅读(86)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示
主题色彩