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

Centos7安装Xrdp远程桌面服务

[复制链接]

977

主题

92

回帖

5万

积分

管理员

积分
52847
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。
; p4 x' \% ~" I系统环境3 |) _# I/ ]/ H( I, L  u2 a7 ?& h: T1 ^
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows10
    4 V5 z' t- S3 I4 e. E$ ?; b! o
安装桌面环境
- Y1 W! d1 o) X! k- Q6 D本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。; [; m3 L! @9 O/ P$ ^
下面的命令列出可用环境组:
+ f4 G+ d: D8 I  l2 m
  1. [root@localhost ~]# yum grouplist
      f2 Z" b/ G3 J. b5 G
  2. Loaded plugins: fastestmirror
    & U: S4 ?0 I, {4 s% n
  3. There is no installed groups file.0 F2 l5 C( q0 C# K8 I
  4. Maybe run: yum groups mark convert (see man yum)/ j% M$ d0 T9 t' Q/ z  ^
  5. Loading mirror speeds from cached hostfile6 p9 m' ]3 @3 ~4 v8 T" z
  6. * base: mirrors.tuna.tsinghua.edu.cn
    ) ?$ I, H; n8 P& N% \' G) I# C# o( U4 p" F
  7. * epel: mirrors.aliyun.com4 k3 X$ R* P( U' i! c( W
  8. * extras: mirrors.aliyun.com
    " w) m6 d$ f9 e' ^, p9 ?7 }" O
  9. * updates: mirrors.aliyun.com
    - x5 R) Q  `* X- f
  10. Available Environment Groups:
    ) X. Z3 ~. O: S4 N' }; F2 A
  11.    Minimal Install
    8 c' v+ h$ B$ X6 @
  12.    Compute Node
    # G- S0 B. u" h- t3 a
  13.    Infrastructure Server
      w/ {5 G, r# D# o$ {3 Z0 N2 S
  14.    File and Print Server
    : a; n$ h0 P) C. W& b' Z( k1 ^7 I
  15.    Cinnamon Desktop7 ]2 t4 l- }4 [; d4 d' B) F+ P, h
  16.    MATE Desktop9 r, k0 U  Y% u& s
  17.    Basic Web Server
      r! y: b1 h% }( r' E$ p  Z
  18.    Virtualization Host
    3 r4 H4 ?" N: n8 b3 H
  19.    Server with GUI+ ~2 i, }& |+ e3 i. D- m- w' @
  20.    GNOME Desktop
    " p  O5 T' [4 Z* C
  21.    KDE Plasma Workspaces
    4 T, K" K2 y) P! W' L' A+ C* E
  22.    Development and Creative Workstation
    9 |3 E1 Y7 ^: Y- [3 E! D" R
  23. Available Groups:! r$ s: J9 [/ v: L
  24.    Cinnamon
    6 I" _% y1 k: J& x  w4 r" T3 ?8 T' I: e
  25.    Compatibility Libraries9 K/ ?, T, o" S* q
  26.    Console Internet Tools
    - o+ g5 ^" T; ]' Z% W9 l$ B% R
  27.    Development Tools0 y( |6 k+ T6 r$ d
  28.    Educational Software! m" c% f- v7 t! a3 F9 S2 J2 ^
  29.    Electronic Lab5 g& M  M0 U" y9 h) t
  30.    Fedora Packager( W" _" j+ ?1 Z( t0 M! V4 }  ]
  31.    General Purpose Desktop
    9 `$ }# k! K" q" S! L
  32.    Graphical Administration Tools
    # D5 W- e- |/ Y! n2 V3 `* `
  33.    Haskell
    # A1 u, F4 n! Q
  34.    LXQt Desktop! C6 t: d4 C  x' h
  35.    Legacy UNIX Compatibility  H$ Y! Q/ X& t$ g  d
  36.    MATE  W  m0 y, p" E! H& R% E# T
  37.    Milkymist
    . I& S  H; \$ b$ h7 t( K' i
  38.    Scientific Support
    / T4 n, m  @* Z) y! E! \
  39.    Security Tools
    / _' N, b( q% k7 ^2 \
  40.    Smart Card Support( E/ u& g% l' ]# _$ \  M  D; s6 l4 D
  41.    System Administration Tools
    1 w+ {8 ^3 e* r# ]# j
  42.    System Management7 r; t$ p- p' ^0 \# ~
  43.    TurboGears application framework3 x# Q5 f( ]/ ~, s: W5 {( k. a
  44.    Xfce
    1 V; b3 N, X% i# y5 i8 \7 c
  45. Done
复制代码
" @* n% G* N/ D0 T

+ q. s$ r7 p; d- M5 B2 m" M$ `4 l我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:
& ?9 Z3 H* I: a- O" k7 m' _$ s
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码

( S8 Z8 h  ^0 ?, U4 l( R# g; y. T  Z0 E. k: }8 y* F
安装Xrdp
1 C2 }( J1 T1 l+ [
  1. [root@localhost ~]# yum -y install xrdp
复制代码
2 s& E3 O* ?; V) V8 p
; K) l5 Z& q- T6 \, v
安装完成之后,设置开机启动并启动xrdp
- Z* Z4 h$ d. n3 y( E0 D
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码
5 f5 p4 q4 f; O; M$ g: ?0 U( _

# c1 p* N6 n1 f6 i; n) h+ a创建~/.Xclients,设置默认启动xfce4桌面
, ^& U% J/ @8 o) P' }, p
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
    1 i# _' `' u! a/ e5 D" R
  2. [root@localhost ~]# chmod +x .Xclients
复制代码

9 ~. W4 A' {3 N/ o* q) \& M  C" E3 {- T5 w7 \4 c  a1 U- `2 x4 P
在客户端远程连接
" A; |6 D' p; U8 V$ E$ W- B/ \0 J
- {& Y" {' q6 v5 P' c+ f+ I" b4 H9 b4 w
* i* L2 @- c1 r& G
总结
8 Y& q2 W4 ~3 H2 _( A2 L7 Y" H/ k安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。' _2 \' `0 R  n7 N4 x8 A

# d, p) X$ E" f) e, p$ W/ U! I1 P" w! v6 `5 c* S
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2025-2-25 10:13 , Processed in 0.095249 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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