Loading

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 @ 2022-05-27 16:11  袁与张  阅读(27)  评论(0编辑  收藏  举报