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

Centos7安装Xrdp远程桌面服务

[复制链接]

991

主题

92

回帖

5万

积分

管理员

积分
55457
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。0 X+ A) f: {: B( Z4 [
系统环境/ z; M- ~2 z7 y7 f9 t4 u1 ?+ n
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows10
    % m; t4 v, P6 V9 l8 r6 T2 T
安装桌面环境
! N  d" B3 H" H! k- t6 l0 H本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。
2 t* c2 p: @$ E9 F4 X5 H  y下面的命令列出可用环境组:
3 b% Z9 P* L6 o5 g' [
  1. [root@localhost ~]# yum grouplist
    . ^9 Q% ^" M9 W3 C8 W
  2. Loaded plugins: fastestmirror
    . U) I* e! a, k& h! q& K8 X
  3. There is no installed groups file.1 D  Z% k. I0 i- ]2 b) S7 t
  4. Maybe run: yum groups mark convert (see man yum)
    * P4 t- S8 N3 {1 ]' J' l  ]* a
  5. Loading mirror speeds from cached hostfile% Y1 i3 r2 d7 I0 Y, N0 f
  6. * base: mirrors.tuna.tsinghua.edu.cn1 T$ g& J8 h" |% F
  7. * epel: mirrors.aliyun.com4 t+ u) ?/ h* P7 n
  8. * extras: mirrors.aliyun.com
    2 Z0 ~. e; a, l3 \; x" n/ a
  9. * updates: mirrors.aliyun.com
    1 p  y2 D) b/ _2 W% j- A1 v
  10. Available Environment Groups:2 I. H5 f6 a4 ^& L+ j9 X9 t
  11.    Minimal Install
    " k5 h9 r1 m6 p2 u4 R* W
  12.    Compute Node
    7 ?- z! ]4 N$ s/ S9 P4 u8 N
  13.    Infrastructure Server- H5 d' d! B7 K
  14.    File and Print Server
    5 {$ b" F, O7 _$ c
  15.    Cinnamon Desktop# m2 o7 S0 @. f3 ~2 Q
  16.    MATE Desktop" A) G' s2 s  E7 l8 L, b
  17.    Basic Web Server
    * J: G8 P9 a2 S- k
  18.    Virtualization Host
    3 f6 A& v8 u2 n  g; U2 \
  19.    Server with GUI, }* c& d, A6 j- k% W
  20.    GNOME Desktop% S4 s7 c- o5 i1 Z' q$ r4 k
  21.    KDE Plasma Workspaces9 S5 A; Q, H; v4 z
  22.    Development and Creative Workstation' {& l+ t% f7 _; d# P& J" y
  23. Available Groups:3 B+ m0 K# u: u6 f. K7 f
  24.    Cinnamon+ E- _6 n' P9 O; m9 t
  25.    Compatibility Libraries+ L. ]" i5 G" F" o- w( i" J
  26.    Console Internet Tools  R$ I! \) ]9 y: A! C/ y
  27.    Development Tools$ O! X! C4 @- N8 c
  28.    Educational Software
    - e5 f1 h3 A- V1 N% K
  29.    Electronic Lab
    9 ^& r+ x5 E& I' `
  30.    Fedora Packager& R9 R, Z0 H# A! o6 x9 Z: ?
  31.    General Purpose Desktop
    6 N* `* x# h0 y# q6 Q9 W3 a
  32.    Graphical Administration Tools
    + z+ e& F$ A' l  p. j. v  t
  33.    Haskell$ n6 W9 Y/ _' U+ i( g: A4 R% A7 G
  34.    LXQt Desktop
    9 O5 r" H7 k( d& ?0 Y
  35.    Legacy UNIX Compatibility
      e% d3 e1 d3 p& B- L) {$ T# m9 r$ e
  36.    MATE
    + q; X2 Y2 r- C  o3 z; X- ?
  37.    Milkymist! \/ Q1 W$ ~: n, O# c
  38.    Scientific Support
    # R2 G) t% j7 z$ T: p
  39.    Security Tools
    . O& Y. @* {. Z* K( Q% V; }, C
  40.    Smart Card Support& _+ H$ [( w% t
  41.    System Administration Tools
    ) a2 s& ]3 U0 u. }8 o3 a$ {0 V
  42.    System Management1 O+ p# M. ?9 L2 f! g* p) C
  43.    TurboGears application framework
    6 p7 R% v  g8 `( }
  44.    Xfce) d1 u, U# v: @0 I/ V
  45. Done
复制代码

/ s, v/ b% B, f7 B7 l$ M5 p: f9 G0 S  g% k5 F$ d0 J4 h
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:7 }: X# _3 G- A: X, h
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
8 L/ F5 `# U, r% h8 @

6 o( W; B; g; ?& r( d# a安装Xrdp; X" r& V9 H. w3 x/ i. ?! ]# _
  1. [root@localhost ~]# yum -y install xrdp
复制代码

  d) P- \5 X; {5 t% Y
: j( X0 X7 B9 g0 s8 s6 H: c安装完成之后,设置开机启动并启动xrdp
9 V+ c; K! n- E3 N0 [- ^. ]; ]
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码

0 k1 A0 J$ V: E7 V1 x
% \+ T5 H  U6 i. Y3 s6 m创建~/.Xclients,设置默认启动xfce4桌面
/ D: R. t: m- D4 T- t
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
    + r4 t$ `- ]" ~) z
  2. [root@localhost ~]# chmod +x .Xclients
复制代码
/ E, V/ c+ W" O% u
* m9 s: [" D3 L$ P& s
在客户端远程连接
0 M6 N* s; P5 ?4 E2 G% J3 L! B* |6 ^1 W& ?* g

: ?) k! M( v9 y& p
' o- S" h! Z" I% I3 z: \总结
1 o& J3 U) q; @& o7 Q6 v安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
# p" I" h0 U) b% ~; s8 q/ n1 |: V  o) q4 L7 B* ]
4 `; o% h, [* A; e
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

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

Powered by xyh-moon X3.5

© 2001-2026 Discuz! Team.

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