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

Centos7安装Xrdp远程桌面服务

[复制链接]

991

主题

92

回帖

5万

积分

管理员

积分
55422
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。& `' v3 s! H# M$ Y
系统环境$ D  g: r( t8 a' z
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows10
    ; o* x: d8 V3 u) G  u+ X6 H. e6 ]
安装桌面环境7 a& q. B  D; w, |2 G% ~, I4 ^
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。2 F, K' A0 T9 d( `: b0 i$ e: E( v
下面的命令列出可用环境组:/ H4 b! m/ v0 W9 }4 |6 I
  1. [root@localhost ~]# yum grouplist
    4 _. r! n" ]$ R, y/ D+ f, w/ D
  2. Loaded plugins: fastestmirror
    8 m. |& Q" f3 b* s/ L, b! ~( m) ]5 D
  3. There is no installed groups file.' ?1 Q+ q& a$ G) P" w
  4. Maybe run: yum groups mark convert (see man yum): m& B+ `' l; J- f: X" ]
  5. Loading mirror speeds from cached hostfile, {  n1 {: \8 N# b; H7 F
  6. * base: mirrors.tuna.tsinghua.edu.cn* ]' _( b# \  b5 J1 M- ?
  7. * epel: mirrors.aliyun.com# |( u8 t" h2 g1 G5 N
  8. * extras: mirrors.aliyun.com
    8 {, m3 t; C6 k9 F- K$ u/ Y
  9. * updates: mirrors.aliyun.com
    - }/ }. m1 q3 m7 E% D
  10. Available Environment Groups:: w0 a% y1 {6 u. ^
  11.    Minimal Install6 l; t) I4 Z7 N6 e
  12.    Compute Node2 c& s) \( W7 P1 D$ m" d; d
  13.    Infrastructure Server
    # _/ q' g% F8 z6 a
  14.    File and Print Server
    1 T1 u( j: {" W: r- {/ x9 B/ Q
  15.    Cinnamon Desktop0 L6 K& h5 y/ w7 p' Z4 m, u
  16.    MATE Desktop
    " @' n# V$ b  y9 j2 M5 }' `+ u
  17.    Basic Web Server) Z8 w- i9 t6 w+ Y2 I) x" U
  18.    Virtualization Host2 S! o8 |3 ~9 l: m2 e
  19.    Server with GUI
    . q4 y- n, W8 k6 F1 A4 G* `
  20.    GNOME Desktop" G* g; N4 b* k9 K  E* L+ s4 `
  21.    KDE Plasma Workspaces
    0 V" H' l/ c6 n; g: E+ a
  22.    Development and Creative Workstation) a) \7 y# s3 ?% o
  23. Available Groups:
    : K7 {7 s0 w* F3 r. ]
  24.    Cinnamon  h* V3 P" L1 p4 L* `
  25.    Compatibility Libraries, N! A! y8 W8 _/ s. R
  26.    Console Internet Tools4 A& b6 `9 t. s
  27.    Development Tools% c' H0 N7 o3 J0 L& ~' F7 ^) b$ o
  28.    Educational Software
    + o' \6 S* Y* z7 u! N" m. f
  29.    Electronic Lab
    5 w: A: }/ C- {" {) s. w8 x
  30.    Fedora Packager" [8 Y6 t$ `- @" b; L/ Y
  31.    General Purpose Desktop% f- ^5 V8 B( O% \
  32.    Graphical Administration Tools
    ' h5 O1 Z/ e% T1 [+ _7 ?' C
  33.    Haskell
    ; g/ @* |4 a7 v0 ~* G
  34.    LXQt Desktop
    . x# P0 A; N) U' h+ |. s
  35.    Legacy UNIX Compatibility
    ; D/ q: U! e8 A* j5 p; ?/ q
  36.    MATE6 ?+ M2 j9 [" v( n8 [" z- E) l' C
  37.    Milkymist+ F: H4 S! u  P' H$ q
  38.    Scientific Support
    - X( R5 S7 ?/ y: D/ J
  39.    Security Tools- F* z2 p0 \7 Q9 o1 U( \
  40.    Smart Card Support
    & a' z% W- S6 [/ r% m) c/ }6 X7 Z
  41.    System Administration Tools
    , f8 o8 s1 r6 |8 T' f9 a
  42.    System Management
    ( U- ^- ?; T9 W. n5 [
  43.    TurboGears application framework
    & M- u& z  M, S5 E
  44.    Xfce
    : n$ X) h5 E0 U' ^( w: l+ P% m' t
  45. Done
复制代码
' b0 F- s% M6 k) }3 J/ y* x8 S
5 Z% F0 Z* I# u4 O5 i
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:) t* Q! R  e5 V; I$ {; R2 S6 E; E3 w
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
% Q; ~$ i& O, a. {& ?  n( P
5 F$ x- U; b. G6 R* T1 `; g9 o, G
安装Xrdp# C7 H6 b/ H6 [' V
  1. [root@localhost ~]# yum -y install xrdp
复制代码

& I$ q% G7 Q  d% `' ^  L+ H, x# v* Q
: a6 v0 r3 R% G4 ~; o* n  a8 z安装完成之后,设置开机启动并启动xrdp5 j$ s( B1 L- _: H+ }7 O/ h
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码
  D9 i& p7 S" G! f+ o
$ t! Y- |( Q. s* I. i9 L" z7 Z
创建~/.Xclients,设置默认启动xfce4桌面2 [& d+ [; s3 S, n& T
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
      w2 O1 {4 p+ \( R, Q& g
  2. [root@localhost ~]# chmod +x .Xclients
复制代码

8 f7 l& q: r1 j3 d6 t1 d
' _* K! V1 ]0 ~; t" ?7 e/ K在客户端远程连接
* j2 Z0 ~4 _3 R
# P" b( x1 q7 P, O0 h* N4 e; u4 {$ T8 C* |8 \
' m3 |' _0 K0 Q1 G0 ^2 ]8 g
总结
4 P5 Z7 K& S$ K' R' W, W) H安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
9 g1 [7 P1 Q9 C. B
* n# V) J3 M& ?3 J: \- R( W, p( C
) ?/ E: Z! {: T, b2 x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2026-6-20 05:57 AM , Processed in 0.105453 second(s), 23 queries .

Powered by xyh-moon X3.5

© 2001-2025 Discuz! Team.

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