Linux-通过Windows远程桌面访问CentOS

  我的环境是CentOS 7.2,首先要确保该环境能上网。

  1. 首先安装【epel-release-latest-7.noarch.rpm】
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum makecache
img_74c206081414e1fed87a73011962f844.png
install epel.png
  1. 安装【xrdp】
yum -y install xrdp tigervnc-server

运行命令输出如下:

[root@k8smaster ~]# yum -y install xrdp tigervnc-server
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink                                                                                                                            | 5.7 kB  00:00:00     
epel                                                                                                                                            | 3.2 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                                                                                                     |  88 kB  00:00:00     
(2/3): epel/x86_64/updateinfo                                                                                                                   | 929 kB  00:00:01     
(3/3): epel/x86_64/primary                                                                                                                      | 3.5 MB  00:00:17     
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
epel                                                                                                                                                       12618/12618
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.8.0-5.el7 will be installed
---> Package xrdp.x86_64 1:0.9.7-1.el7 will be installed
--> Processing Dependency: xorgxrdp for package: 1:xrdp-0.9.7-1.el7.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: 1:xrdp-0.9.7-1.el7.x86_64
--> Running transaction check
---> Package openssl-libs.x86_64 1:1.0.1e-42.el7.9 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7.9 for package: 1:openssl-1.0.1e-42.el7.9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-12.el7 will be an update
---> Package xorgxrdp.x86_64 0:0.2.7-1.el7 will be installed
--> Processing Dependency: xorg-x11-server-Xorg(x86-64) = 1.19.5 for package: xorgxrdp-0.2.7-1.el7.x86_64
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-42.el7.9 will be updated
---> Package openssl.x86_64 1:1.0.2k-12.el7 will be an update
---> Package xorg-x11-server-Xorg.x86_64 0:1.17.2-10.el7 will be updated
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-dummy-0.3.6-21.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-vesa-2.3.2-20.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-intel-2.99.917-8.20150615.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-v4l-0.2.0-42.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-fbdev-0.4.3-20.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-ati-7.5.0-3.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-vmware-13.0.2-7.20150211git8f0cf7c.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: 1:xorg-x11-drv-nouveau-1.0.11-2.el7.x86_64
--> Processing Dependency: xserver-abi(videodrv-19) >= 0 for package: xorg-x11-drv-qxl-0.1.1-18.el7.x86_64
--> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-synaptics-1.8.2-1.el7.x86_64
--> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-void-1.4.1-1.el7.x86_64
--> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-wacom-0.29.0-1.el7.x86_64
--> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-vmmouse-13.0.0-11.el7.x86_64
--> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-evdev-2.9.2-2.el7.x86_64
---> Package xorg-x11-server-Xorg.x86_64 0:1.19.5-5.el7 will be an update
--> Processing Dependency: xorg-x11-server-common >= 1.19.5-5.el7 for package: xorg-x11-server-Xorg-1.19.5-5.el7.x86_64
--> Processing Dependency: libXfont2.so.2()(64bit) for package: xorg-x11-server-Xorg-1.19.5-5.el7.x86_64
--> Running transaction check
---> Package libXfont2.x86_64 0:2.0.1-2.el7 will be installed
---> Package xorg-x11-drv-ati.x86_64 0:7.5.0-3.el7 will be updated
---> Package xorg-x11-drv-ati.x86_64 0:7.10.0-1.el7 will be an update
---> Package xorg-x11-drv-dummy.x86_64 0:0.3.6-21.el7 will be updated
---> Package xorg-x11-drv-dummy.x86_64 0:0.3.7-1.el7 will be an update
---> Package xorg-x11-drv-evdev.x86_64 0:2.9.2-2.el7 will be updated
---> Package xorg-x11-drv-evdev.x86_64 0:2.10.5-2.1.el7 will be an update
---> Package xorg-x11-drv-fbdev.x86_64 0:0.4.3-20.el7 will be updated
---> Package xorg-x11-drv-fbdev.x86_64 0:0.4.3-25.el7 will be an update
---> Package xorg-x11-drv-intel.x86_64 0:2.99.917-8.20150615.el7 will be updated
---> Package xorg-x11-drv-intel.x86_64 0:2.99.917-27.20160929.el7 will be an update
---> Package xorg-x11-drv-nouveau.x86_64 1:1.0.11-2.el7 will be updated
---> Package xorg-x11-drv-nouveau.x86_64 1:1.0.13-3.el7 will be an update
---> Package xorg-x11-drv-qxl.x86_64 0:0.1.1-18.el7 will be updated
---> Package xorg-x11-drv-qxl.x86_64 0:0.1.5-3.el7 will be an update
---> Package xorg-x11-drv-synaptics.x86_64 0:1.8.2-1.el7 will be updated
---> Package xorg-x11-drv-synaptics.x86_64 0:1.9.0-1.el7 will be an update
---> Package xorg-x11-drv-v4l.x86_64 0:0.2.0-42.el7 will be updated
---> Package xorg-x11-drv-v4l.x86_64 0:0.2.0-47.el7 will be an update
---> Package xorg-x11-drv-vesa.x86_64 0:2.3.2-20.el7 will be updated
---> Package xorg-x11-drv-vesa.x86_64 0:2.3.2-25.1.el7 will be an update
---> Package xorg-x11-drv-vmmouse.x86_64 0:13.0.0-11.el7 will be updated
---> Package xorg-x11-drv-vmmouse.x86_64 0:13.1.0-1.el7 will be an update
---> Package xorg-x11-drv-vmware.x86_64 0:13.0.2-7.20150211git8f0cf7c.el7 will be updated
---> Package xorg-x11-drv-vmware.x86_64 0:13.2.1-1.el7 will be an update
---> Package xorg-x11-drv-void.x86_64 0:1.4.1-1.el7 will be updated
---> Package xorg-x11-drv-void.x86_64 0:1.4.1-2.el7 will be an update
---> Package xorg-x11-drv-wacom.x86_64 0:0.29.0-1.el7 will be updated
---> Package xorg-x11-drv-wacom.x86_64 0:0.34.2-5.el7 will be an update
---> Package xorg-x11-server-common.x86_64 0:1.17.2-10.el7 will be updated
---> Package xorg-x11-server-common.x86_64 0:1.19.5-5.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                                        Arch                           Version                                           Repository                       Size
=======================================================================================================================================================================
Installing:
 tigervnc-server                                x86_64                         1.8.0-5.el7                                       base                            214 k
 xrdp                                           x86_64                         1:0.9.7-1.el7                                     epel                            416 k
Installing for dependencies:
 libXfont2                                      x86_64                         2.0.1-2.el7                                       base                            140 k
 xorgxrdp                                       x86_64                         0.2.7-1.el7                                       epel                             62 k
Updating for dependencies:
 openssl                                        x86_64                         1:1.0.2k-12.el7                                   base                            492 k
 openssl-libs                                   x86_64                         1:1.0.2k-12.el7                                   base                            1.2 M
 xorg-x11-drv-ati                               x86_64                         7.10.0-1.el7                                      base                            161 k
 xorg-x11-drv-dummy                             x86_64                         0.3.7-1.el7                                       base                             18 k
 xorg-x11-drv-evdev                             x86_64                         2.10.5-2.1.el7                                    base                             48 k
 xorg-x11-drv-fbdev                             x86_64                         0.4.3-25.el7                                      base                             20 k
 xorg-x11-drv-intel                             x86_64                         2.99.917-27.20160929.el7                          base                            672 k
 xorg-x11-drv-nouveau                           x86_64                         1:1.0.13-3.el7                                    base                             93 k
 xorg-x11-drv-qxl                               x86_64                         0.1.5-3.el7                                       base                             92 k
 xorg-x11-drv-synaptics                         x86_64                         1.9.0-1.el7                                       base                             82 k
 xorg-x11-drv-v4l                               x86_64                         0.2.0-47.el7                                      base                             21 k
 xorg-x11-drv-vesa                              x86_64                         2.3.2-25.1.el7                                    base                             25 k
 xorg-x11-drv-vmmouse                           x86_64                         13.1.0-1.el7                                      base                             24 k
 xorg-x11-drv-vmware                            x86_64                         13.2.1-1.el7                                      base                             83 k
 xorg-x11-drv-void                              x86_64                         1.4.1-2.el7                                       base                             14 k
 xorg-x11-drv-wacom                             x86_64                         0.34.2-5.el7                                      updates                         306 k
 xorg-x11-server-Xorg                           x86_64                         1.19.5-5.el7                                      base                            1.5 M
 xorg-x11-server-common                         x86_64                         1.19.5-5.el7                                      base                             53 k

Transaction Summary
=======================================================================================================================================================================
Install  2 Packages (+ 2 Dependent packages)
Upgrade             ( 18 Dependent packages)

Total download size: 5.6 M
Downloading packages:
No Presto metadata available for base
(1/22): libXfont2-2.0.1-2.el7.x86_64.rpm                                                                                                        | 140 kB  00:00:00     
(2/22): openssl-1.0.2k-12.el7.x86_64.rpm                                                                                                        | 492 kB  00:00:01     
(3/22): tigervnc-server-1.8.0-5.el7.x86_64.rpm                                                                                                  | 214 kB  00:00:00     
(4/22): xorg-x11-drv-ati-7.10.0-1.el7.x86_64.rpm                                                                                                | 161 kB  00:00:00     
(5/22): xorg-x11-drv-dummy-0.3.7-1.el7.x86_64.rpm                                                                                               |  18 kB  00:00:00     
(6/22): xorg-x11-drv-evdev-2.10.5-2.1.el7.x86_64.rpm                                                                                            |  48 kB  00:00:00     
(7/22): openssl-libs-1.0.2k-12.el7.x86_64.rpm                                                                                                   | 1.2 MB  00:00:01     
(8/22): xorg-x11-drv-fbdev-0.4.3-25.el7.x86_64.rpm                                                                                              |  20 kB  00:00:00     
(9/22): xorg-x11-drv-nouveau-1.0.13-3.el7.x86_64.rpm                                                                                            |  93 kB  00:00:00     
(10/22): xorg-x11-drv-qxl-0.1.5-3.el7.x86_64.rpm                                                                                                |  92 kB  00:00:00     
(11/22): xorg-x11-drv-synaptics-1.9.0-1.el7.x86_64.rpm                                                                                          |  82 kB  00:00:00     
(12/22): xorg-x11-drv-v4l-0.2.0-47.el7.x86_64.rpm                                                                                               |  21 kB  00:00:00     
(13/22): xorg-x11-drv-intel-2.99.917-27.20160929.el7.x86_64.rpm                                                                                 | 672 kB  00:00:00     
(14/22): xorg-x11-drv-vmmouse-13.1.0-1.el7.x86_64.rpm                                                                                           |  24 kB  00:00:00     
(15/22): xorg-x11-drv-vesa-2.3.2-25.1.el7.x86_64.rpm                                                                                            |  25 kB  00:00:00     
(16/22): xorg-x11-drv-void-1.4.1-2.el7.x86_64.rpm                                                                                               |  14 kB  00:00:00     
(17/22): xorg-x11-drv-vmware-13.2.1-1.el7.x86_64.rpm                                                                                            |  83 kB  00:00:00     
(18/22): xorg-x11-server-common-1.19.5-5.el7.x86_64.rpm                                                                                         |  53 kB  00:00:00     
(19/22): xorg-x11-drv-wacom-0.34.2-5.el7.x86_64.rpm                                                                                             | 306 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/xrdp-0.9.7-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY   ] 715 kB/s | 4.2 MB  00:00:02 ETA 
Public key for xrdp-0.9.7-1.el7.x86_64.rpm is not installed
(20/22): xrdp-0.9.7-1.el7.x86_64.rpm                                                                                                            | 416 kB  00:00:00     
(21/22): xorgxrdp-0.2.7-1.el7.x86_64.rpm                                                                                                        |  62 kB  00:00:00     
(22/22): xorg-x11-server-Xorg-1.19.5-5.el7.x86_64.rpm                                                                                           | 1.5 MB  00:00:02     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                  1.1 MB/s | 5.6 MB  00:00:05     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Updating   : 1:openssl-libs-1.0.2k-12.el7.x86_64                                                                                                                1/40 
  Updating   : xorg-x11-server-common-1.19.5-5.el7.x86_64                                                                                                         2/40 
  Installing : libXfont2-2.0.1-2.el7.x86_64                                                                                                                       3/40 
  Updating   : xorg-x11-server-Xorg-1.19.5-5.el7.x86_64                                                                                                           4/40 
  Installing : xorgxrdp-0.2.7-1.el7.x86_64                                                                                                                        5/40 
  Installing : 1:xrdp-0.9.7-1.el7.x86_64                                                                                                                          6/40 
  Updating   : xorg-x11-drv-fbdev-0.4.3-25.el7.x86_64                                                                                                             7/40 
  Updating   : xorg-x11-drv-dummy-0.3.7-1.el7.x86_64                                                                                                              8/40 
  Updating   : xorg-x11-drv-intel-2.99.917-27.20160929.el7.x86_64                                                                                                 9/40 
  Updating   : 1:xorg-x11-drv-nouveau-1.0.13-3.el7.x86_64                                                                                                        10/40 
  Updating   : xorg-x11-drv-evdev-2.10.5-2.1.el7.x86_64                                                                                                          11/40 
  Updating   : xorg-x11-drv-vmware-13.2.1-1.el7.x86_64                                                                                                           12/40 
  Updating   : xorg-x11-drv-wacom-0.34.2-5.el7.x86_64                                                                                                            13/40 
  Updating   : xorg-x11-drv-ati-7.10.0-1.el7.x86_64                                                                                                              14/40 
  Updating   : xorg-x11-drv-v4l-0.2.0-47.el7.x86_64                                                                                                              15/40 
  Updating   : xorg-x11-drv-qxl-0.1.5-3.el7.x86_64                                                                                                               16/40 
  Updating   : xorg-x11-drv-void-1.4.1-2.el7.x86_64                                                                                                              17/40 
  Updating   : xorg-x11-drv-synaptics-1.9.0-1.el7.x86_64                                                                                                         18/40 
  Updating   : xorg-x11-drv-vmmouse-13.1.0-1.el7.x86_64                                                                                                          19/40 
  Updating   : xorg-x11-drv-vesa-2.3.2-25.1.el7.x86_64                                                                                                           20/40 
  Updating   : 1:openssl-1.0.2k-12.el7.x86_64                                                                                                                    21/40 
  Installing : tigervnc-server-1.8.0-5.el7.x86_64                                                                                                                22/40 
  Cleanup    : 1:openssl-1.0.1e-42.el7.9.x86_64                                                                                                                  23/40 
  Cleanup    : xorg-x11-drv-vesa-2.3.2-20.el7.x86_64                                                                                                             24/40 
  Cleanup    : xorg-x11-drv-vmmouse-13.0.0-11.el7.x86_64                                                                                                         25/40 
  Cleanup    : xorg-x11-drv-synaptics-1.8.2-1.el7.x86_64                                                                                                         26/40 
  Cleanup    : xorg-x11-drv-void-1.4.1-1.el7.x86_64                                                                                                              27/40 
  Cleanup    : xorg-x11-drv-qxl-0.1.1-18.el7.x86_64                                                                                                              28/40 
  Cleanup    : xorg-x11-drv-v4l-0.2.0-42.el7.x86_64                                                                                                              29/40 
  Cleanup    : xorg-x11-drv-ati-7.5.0-3.el7.x86_64                                                                                                               30/40 
  Cleanup    : xorg-x11-drv-wacom-0.29.0-1.el7.x86_64                                                                                                            31/40 
  Cleanup    : xorg-x11-drv-vmware-13.0.2-7.20150211git8f0cf7c.el7.x86_64                                                                                        32/40 
  Cleanup    : xorg-x11-drv-evdev-2.9.2-2.el7.x86_64                                                                                                             33/40 
  Cleanup    : 1:xorg-x11-drv-nouveau-1.0.11-2.el7.x86_64                                                                                                        34/40 
  Cleanup    : xorg-x11-drv-intel-2.99.917-8.20150615.el7.x86_64                                                                                                 35/40 
  Cleanup    : xorg-x11-drv-dummy-0.3.6-21.el7.x86_64                                                                                                            36/40 
  Cleanup    : xorg-x11-drv-fbdev-0.4.3-20.el7.x86_64                                                                                                            37/40 
  Cleanup    : xorg-x11-server-Xorg-1.17.2-10.el7.x86_64                                                                                                         38/40 
  Cleanup    : xorg-x11-server-common-1.17.2-10.el7.x86_64                                                                                                       39/40 
  Cleanup    : 1:openssl-libs-1.0.1e-42.el7.9.x86_64                                                                                                             40/40 
  Verifying  : xorg-x11-drv-fbdev-0.4.3-25.el7.x86_64                                                                                                             1/40 
  Verifying  : xorg-x11-drv-dummy-0.3.7-1.el7.x86_64                                                                                                              2/40 
  Verifying  : xorg-x11-drv-intel-2.99.917-27.20160929.el7.x86_64                                                                                                 3/40 
  Verifying  : 1:xorg-x11-drv-nouveau-1.0.13-3.el7.x86_64                                                                                                         4/40 
  Verifying  : xorg-x11-drv-evdev-2.10.5-2.1.el7.x86_64                                                                                                           5/40 
  Verifying  : libXfont2-2.0.1-2.el7.x86_64                                                                                                                       6/40 
  Verifying  : 1:openssl-libs-1.0.2k-12.el7.x86_64                                                                                                                7/40 
  Verifying  : xorg-x11-server-Xorg-1.19.5-5.el7.x86_64                                                                                                           8/40 
  Verifying  : tigervnc-server-1.8.0-5.el7.x86_64                                                                                                                 9/40 
  Verifying  : xorg-x11-drv-vmware-13.2.1-1.el7.x86_64                                                                                                           10/40 
  Verifying  : xorg-x11-drv-wacom-0.34.2-5.el7.x86_64                                                                                                            11/40 
  Verifying  : xorgxrdp-0.2.7-1.el7.x86_64                                                                                                                       12/40 
  Verifying  : xorg-x11-drv-ati-7.10.0-1.el7.x86_64                                                                                                              13/40 
  Verifying  : 1:xrdp-0.9.7-1.el7.x86_64                                                                                                                         14/40 
  Verifying  : xorg-x11-drv-v4l-0.2.0-47.el7.x86_64                                                                                                              15/40 
  Verifying  : xorg-x11-drv-qxl-0.1.5-3.el7.x86_64                                                                                                               16/40 
  Verifying  : xorg-x11-drv-void-1.4.1-2.el7.x86_64                                                                                                              17/40 
  Verifying  : xorg-x11-drv-synaptics-1.9.0-1.el7.x86_64                                                                                                         18/40 
  Verifying  : xorg-x11-server-common-1.19.5-5.el7.x86_64                                                                                                        19/40 
  Verifying  : xorg-x11-drv-vmmouse-13.1.0-1.el7.x86_64                                                                                                          20/40 
  Verifying  : xorg-x11-drv-vesa-2.3.2-25.1.el7.x86_64                                                                                                           21/40 
  Verifying  : 1:openssl-1.0.2k-12.el7.x86_64                                                                                                                    22/40 
  Verifying  : xorg-x11-drv-intel-2.99.917-8.20150615.el7.x86_64                                                                                                 23/40 
  Verifying  : xorg-x11-drv-vmware-13.0.2-7.20150211git8f0cf7c.el7.x86_64                                                                                        24/40 
  Verifying  : xorg-x11-drv-evdev-2.9.2-2.el7.x86_64                                                                                                             25/40 
  Verifying  : xorg-x11-drv-ati-7.5.0-3.el7.x86_64                                                                                                               26/40 
  Verifying  : 1:xorg-x11-drv-nouveau-1.0.11-2.el7.x86_64                                                                                                        27/40 
  Verifying  : xorg-x11-server-common-1.17.2-10.el7.x86_64                                                                                                       28/40 
  Verifying  : xorg-x11-drv-synaptics-1.8.2-1.el7.x86_64                                                                                                         29/40 
  Verifying  : xorg-x11-drv-vmmouse-13.0.0-11.el7.x86_64                                                                                                         30/40 
  Verifying  : xorg-x11-server-Xorg-1.17.2-10.el7.x86_64                                                                                                         31/40 
  Verifying  : xorg-x11-drv-wacom-0.29.0-1.el7.x86_64                                                                                                            32/40 
  Verifying  : xorg-x11-drv-dummy-0.3.6-21.el7.x86_64                                                                                                            33/40 
  Verifying  : xorg-x11-drv-fbdev-0.4.3-20.el7.x86_64                                                                                                            34/40 
  Verifying  : 1:openssl-libs-1.0.1e-42.el7.9.x86_64                                                                                                             35/40 
  Verifying  : xorg-x11-drv-qxl-0.1.1-18.el7.x86_64                                                                                                              36/40 
  Verifying  : xorg-x11-drv-vesa-2.3.2-20.el7.x86_64                                                                                                             37/40 
  Verifying  : xorg-x11-drv-void-1.4.1-1.el7.x86_64                                                                                                              38/40 
  Verifying  : xorg-x11-drv-v4l-0.2.0-42.el7.x86_64                                                                                                              39/40 
  Verifying  : 1:openssl-1.0.1e-42.el7.9.x86_64                                                                                                                  40/40 

Installed:
  tigervnc-server.x86_64 0:1.8.0-5.el7                                                    xrdp.x86_64 1:0.9.7-1.el7                                                   

Dependency Installed:
  libXfont2.x86_64 0:2.0.1-2.el7                                                     xorgxrdp.x86_64 0:0.2.7-1.el7                                                    

Dependency Updated:
  openssl.x86_64 1:1.0.2k-12.el7                               openssl-libs.x86_64 1:1.0.2k-12.el7                xorg-x11-drv-ati.x86_64 0:7.10.0-1.el7              
  xorg-x11-drv-dummy.x86_64 0:0.3.7-1.el7                      xorg-x11-drv-evdev.x86_64 0:2.10.5-2.1.el7         xorg-x11-drv-fbdev.x86_64 0:0.4.3-25.el7            
  xorg-x11-drv-intel.x86_64 0:2.99.917-27.20160929.el7         xorg-x11-drv-nouveau.x86_64 1:1.0.13-3.el7         xorg-x11-drv-qxl.x86_64 0:0.1.5-3.el7               
  xorg-x11-drv-synaptics.x86_64 0:1.9.0-1.el7                  xorg-x11-drv-v4l.x86_64 0:0.2.0-47.el7             xorg-x11-drv-vesa.x86_64 0:2.3.2-25.1.el7           
  xorg-x11-drv-vmmouse.x86_64 0:13.1.0-1.el7                   xorg-x11-drv-vmware.x86_64 0:13.2.1-1.el7          xorg-x11-drv-void.x86_64 0:1.4.1-2.el7              
  xorg-x11-drv-wacom.x86_64 0:0.34.2-5.el7                     xorg-x11-server-Xorg.x86_64 0:1.19.5-5.el7         xorg-x11-server-common.x86_64 0:1.19.5-5.el7        

Complete!
  1. 设置登录用户和密码
vncpasswd {用户名}
img_f9c53e86d07bbfab99bcf210a4ccb338.png
set vnc user.png
  1. 修改【xrdp】配置文件
vi /etc/xrdp/xrdp.ini

将【max_bpp】由32修改为24

img_6f82352f3f95de89ede2ff1a451ffeae.png
修改配置文件.png
  1. 打开防火墙3389端口
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
img_afe05f8744abad5cf4048aa3931e4be1.png
打开3389端口.png
  1. 启动xrdp服务,并设置为开机启动
systemctl start xrdp
systemctl enable xrdp

  现在通过Windows远程桌面试一下,看到如下界面


img_068698a0f30b41a95ae6fd7573cfead8.png
远程连接.png

【遇到问题一】启动xrdp服务出现错误【Failed at step EXEC spawning /usr/sbin/xrdp: Permission denied】

img_665686528c8e33a4991f30d4dd056088.png
启动失败1

【遇到问题二】启动xrdp服务出现错误【xrdp.service: main process exited, code=exited, status=203/EXEC】

img_a6fb9f9a1254908de9ea65d43bd4062f.png
启动失败2

针对以上两种问题,请执行以下命令

chcon -t bin_t /usr/sbin/xrdp /usr/sbin/xrdp-sesman

执行完后再启动就没问题了

img_b9fc1af6b8a663da45730182e606dbfe.png
启动成功
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值