找回密码
 立即注册
搜索
查看: 302|回复: 0

Centos7安装Xrdp远程桌面服务

[复制链接]

991

主题

92

回帖

5万

积分

管理员

积分
55457
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。' @( I9 b4 Z! c' X- }
系统环境
3 k$ s' V9 x& G: G: W- A$ k
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows10
    - f8 m7 F' c  n! }3 Y) a+ C
安装桌面环境7 U: z  V' h6 E+ u8 z# f
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。
2 m/ e5 A7 \/ I: T下面的命令列出可用环境组:( h8 c7 U' h( K0 E: P
  1. [root@localhost ~]# yum grouplist, E  t! y: d: `8 k
  2. Loaded plugins: fastestmirror
    9 G/ X( J; ~5 W
  3. There is no installed groups file.
    + [, z) l6 q' d9 K7 Y
  4. Maybe run: yum groups mark convert (see man yum)8 q9 \; }; s" v0 H$ |& P+ h1 n
  5. Loading mirror speeds from cached hostfile/ _+ J5 ?3 B9 q8 _! N/ x
  6. * base: mirrors.tuna.tsinghua.edu.cn
    $ B# u% Z* ?1 k7 g
  7. * epel: mirrors.aliyun.com
      ~1 V( C& g" ]* r- m# ?% c
  8. * extras: mirrors.aliyun.com8 V( ]: h2 T! O. n/ G+ W
  9. * updates: mirrors.aliyun.com# U" j6 ]7 f$ V
  10. Available Environment Groups:+ o3 M" s; |; N; @" D7 l
  11.    Minimal Install
    ) w" E2 M0 p) k, O: }, K
  12.    Compute Node8 t" y: O. G2 w" t
  13.    Infrastructure Server1 p& q9 a7 S1 G. _& m
  14.    File and Print Server
    , }7 J5 _3 Z) x! ?4 c+ r3 u
  15.    Cinnamon Desktop
    & t  d( Z/ y  L& A8 b- h" B
  16.    MATE Desktop- O7 t' ^: P" N; u1 o% G$ M4 g
  17.    Basic Web Server, }8 A$ f# k& A5 B, }; I! F
  18.    Virtualization Host, x0 k3 Q5 l& J. b4 f! ?" m9 h
  19.    Server with GUI
    * {" U  d+ ~& T1 `% Y, z7 f, m3 w7 x
  20.    GNOME Desktop
    1 G2 n2 x6 n( o9 _' L
  21.    KDE Plasma Workspaces# B* e4 L! m2 P7 K
  22.    Development and Creative Workstation. W5 Z* n# B2 k% C2 h2 `
  23. Available Groups:
    ; }# e. a4 p9 V& B2 f
  24.    Cinnamon7 _/ B$ ]7 |$ m0 s$ z
  25.    Compatibility Libraries: C% d# {& X1 w, h6 A
  26.    Console Internet Tools
    - z! T' ?; ^/ v) x& _) y
  27.    Development Tools
    3 ^4 L' r6 P) H% F' Z4 D) D8 f
  28.    Educational Software: ~1 V7 v8 D+ c  G" {( x0 u
  29.    Electronic Lab
    ( d) c0 K% n$ ^( ]/ Y" G( B, N
  30.    Fedora Packager" Q( m) W( B! @+ T4 o( C
  31.    General Purpose Desktop. J9 p  v2 d2 ~* w
  32.    Graphical Administration Tools
    % \/ L1 J4 H6 E5 ^/ c) @" Q, z
  33.    Haskell0 `7 q; h' D; e. R+ r
  34.    LXQt Desktop
    ! _) J- N4 Y' A+ S: t# X: [7 [1 i
  35.    Legacy UNIX Compatibility, E2 j: D6 X3 {  P& f- B2 k  G; v
  36.    MATE% P7 U( i1 W  @- l$ z- p! Y5 m0 E
  37.    Milkymist
    3 K5 W3 [& F( s
  38.    Scientific Support
    ) r" r( d, M8 j' |1 x
  39.    Security Tools
    ) m; z3 w/ [* B9 B3 E
  40.    Smart Card Support
    + Y. m, Z5 V" z
  41.    System Administration Tools; ~1 e. Z& x3 g  m  j9 h% I9 @8 }
  42.    System Management
    $ Z  d7 x* P" Q- @
  43.    TurboGears application framework- E3 q6 R& ^/ Z
  44.    Xfce
    9 J. r* o% F" ^# B& e
  45. Done
复制代码

/ U3 b2 C% E1 m0 d/ o: @" [, E% _
8 p2 _2 X+ P' X/ h; X我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:
% ?2 U( y3 l2 _" p) ~" P8 g
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码

4 u+ g4 @- ^. w
8 j( \* ?0 P8 b; R4 T, O; i安装Xrdp
# Q, f/ @. u# L: B2 z& _
  1. [root@localhost ~]# yum -y install xrdp
复制代码

+ Y1 d  V9 s, K5 g5 x8 y2 e+ a. o$ [0 q
安装完成之后,设置开机启动并启动xrdp& F& P+ M5 O' T4 m% X$ d) Q+ j
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码

' q- ~2 a" a' U" ^2 W! W
/ I9 ^% h( v0 h9 }  I! m7 A创建~/.Xclients,设置默认启动xfce4桌面
8 H+ u) @, a  o+ Y; t: T; B
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients+ `0 l% @$ F, c  x
  2. [root@localhost ~]# chmod +x .Xclients
复制代码
3 c6 [9 i* v. \+ \6 ~
: d) n' h: e! p$ N
在客户端远程连接0 C7 `! n" d3 S

) K! f1 p# t# g/ f, x6 q9 n' V. `  W  S; l( ~" d/ z% J
- K+ B9 D! w: c" W
总结
" j- i5 N8 ~3 b* C" m" a, ]+ _: m! ?安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
6 C' f* M/ C4 A+ @6 m0 V4 \% J& ~8 \+ }/ t- \7 R) C3 j$ a6 {0 q
! _7 Q2 G: s4 n9 Y
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2026-8-5 10:21 AM , Processed in 0.107318 second(s), 23 queries .

Powered by xyh-moon X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表