Window10 RDP远程CentOS

warning: 这篇文章距离上次修改已过263天,其中的内容可能已经有所变动。

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、查看是否正常

1371745-20220225112836645-465646129.png1371745-20220225112836645-465646129.png

1371745-20220225112836645-465646129.png1371745-20220225112836645-465646129.png

添加新评论

icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif