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

Centos7安装Xrdp远程桌面服务

[复制链接]

985

主题

92

回帖

5万

积分

管理员

积分
53562
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。) L; k& M  g  ^
系统环境
) E% n: }6 n, Q" E! [
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows101 N1 V& j* g  K9 G0 l4 K
安装桌面环境
9 w# `; d* G' {* G( E3 ]本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。0 c4 O: s! h: s$ T9 p) u
下面的命令列出可用环境组:8 |: ?6 m6 O; c5 u: t
  1. [root@localhost ~]# yum grouplist
    * @( _' v) Q5 f6 k) s. q; g* S
  2. Loaded plugins: fastestmirror
    ! N" W- n8 L( F
  3. There is no installed groups file.  d- ?  J8 V" M
  4. Maybe run: yum groups mark convert (see man yum)' x9 a* W0 J( L8 Z0 i) f
  5. Loading mirror speeds from cached hostfile
      p3 c& u: Z- l, i1 S6 A
  6. * base: mirrors.tuna.tsinghua.edu.cn% z  g' P9 x+ I
  7. * epel: mirrors.aliyun.com
    / S9 ?, w' \. A+ ?9 b$ V* [
  8. * extras: mirrors.aliyun.com. @3 f+ Y7 C5 R- N) {
  9. * updates: mirrors.aliyun.com
    ) |, x4 g2 E# _( F" t: T9 L
  10. Available Environment Groups:; g1 D1 j0 \; o+ N0 s$ A
  11.    Minimal Install1 Z& S+ |1 E' ?7 O: S
  12.    Compute Node
    4 d6 ^1 U1 i- y- L$ F
  13.    Infrastructure Server- W+ c' E  X3 Q  l8 `$ t$ c4 Y
  14.    File and Print Server3 j& W3 ^5 L; L) @/ z
  15.    Cinnamon Desktop
    & j' z5 S0 D. P% ]
  16.    MATE Desktop8 \8 e6 l. T4 g" u: q( U6 O) C
  17.    Basic Web Server
    $ G, ?6 ~) w4 w3 b
  18.    Virtualization Host
    / w% G# _9 a" ]6 R7 Q0 B# t1 h9 B
  19.    Server with GUI
    ; h, ~0 @% Y! B3 z& U
  20.    GNOME Desktop
    $ |" f  \2 e9 w( g+ }8 T, S% q
  21.    KDE Plasma Workspaces
    5 z' m6 X7 p( a3 b3 @3 V* I
  22.    Development and Creative Workstation9 N6 K6 D+ M2 o6 p0 Z. b* M
  23. Available Groups:* z3 T, s8 a3 D- H5 _
  24.    Cinnamon
    , o( y+ }, q0 c3 O% _; l
  25.    Compatibility Libraries
    * h1 N0 s) M# p7 S$ j& G
  26.    Console Internet Tools9 n2 b7 Y" D' @) M' y) o9 A
  27.    Development Tools
    $ E3 {! g" `/ G  U( l6 H
  28.    Educational Software$ w8 F$ b9 t- R
  29.    Electronic Lab
    6 I% a# |/ x1 v) \8 W1 _
  30.    Fedora Packager% w* v6 D' @; }  e
  31.    General Purpose Desktop
    ' _) b6 `7 B' Y3 y' n6 j. \
  32.    Graphical Administration Tools  S" R2 O% X. u5 u# ^
  33.    Haskell
    , X6 \7 K1 b: ~" _
  34.    LXQt Desktop% w: a) w- u( j% u7 b
  35.    Legacy UNIX Compatibility) K$ Y* `  l4 T( U) ~; v
  36.    MATE) ?$ S" E( b/ S  o6 J$ }4 _
  37.    Milkymist0 x( ~; G$ n" `% |9 u& e# B
  38.    Scientific Support
    & C9 U8 [3 a1 A1 ?$ i) [
  39.    Security Tools2 t9 |; a- A7 X' ?, m' R
  40.    Smart Card Support
    5 M) M- u  c5 e3 K; j) Y$ U
  41.    System Administration Tools
    + k' Y6 F# X' Y9 J% c
  42.    System Management
    , S; N' f+ _# C. U2 P
  43.    TurboGears application framework
    4 M3 l- E+ v1 |# p
  44.    Xfce& G8 v( Z5 S2 K& K( O+ F$ a
  45. Done
复制代码
9 p1 _, ]2 Y7 W
2 B: W% {6 `0 N; N2 H, A
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:8 P6 c) d  x. |
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码

  Z: P# `7 M" e
/ c$ S" z/ z" {安装Xrdp* e0 e; A$ _9 v1 Y; u, i
  1. [root@localhost ~]# yum -y install xrdp
复制代码
  X! [! r  J* P; U, F/ d' |
1 |4 G. Y( H, Z
安装完成之后,设置开机启动并启动xrdp
5 j' w* j; e4 a' J8 ?
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码

) @; Z" z: D8 N( Z- t7 ]: P, }* M& o. u
创建~/.Xclients,设置默认启动xfce4桌面9 C) m8 K9 y3 u! w- v
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients  ?9 B% q0 W# c9 P4 c6 ^0 c8 _3 \7 o
  2. [root@localhost ~]# chmod +x .Xclients
复制代码

  _$ c# \' i, S$ w+ T# _6 t" v' o* w/ t, }0 a- |; K
在客户端远程连接
" ?* d* P0 a  ~3 j' E' e  J: S* n: C# s8 m
1 i1 Y+ I4 Q5 J1 j
! t- D1 Y" p. b3 t  N2 Q$ t# `! a* j4 T" ?/ `' S2 @
总结2 H) R+ w# W1 i. M3 o7 X) r
安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
! Q% b! l: y1 s" C5 T$ X9 F; V* o: F  E8 l& s5 T
, V" |& k  d) w+ ~
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2025-11-5 08:35 AM , Processed in 0.084145 second(s), 23 queries .

Powered by xyh-moon X3.5

© 2001-2025 Discuz! Team.

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