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

Centos7安装Xrdp远程桌面服务

[复制链接]

986

主题

92

回帖

5万

积分

管理员

积分
55255
发表于 2022-6-23 09:05:01 | 显示全部楼层 |阅读模式
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。
. z! u9 D7 ]1 F  E8 c系统环境
9 \) J9 w7 `( G) @5 [# l  Z
  • 服务端:Centos7.7 Minimal
  • 客户端:Windows10
    9 D7 q: {1 g+ K
安装桌面环境! j9 M) d+ s* P# `! @% W  ^2 q
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。9 w+ V5 Z" N: B' j9 v+ T% z' C
下面的命令列出可用环境组:
" s: M9 h. m* T; ~6 ~# C
  1. [root@localhost ~]# yum grouplist; d4 q$ s5 U6 I
  2. Loaded plugins: fastestmirror
    5 ^. T6 [# B' L+ b
  3. There is no installed groups file.
    ' G$ x3 ?1 H; ?: z: ?
  4. Maybe run: yum groups mark convert (see man yum)
    , |! ]+ @5 i' K7 ~
  5. Loading mirror speeds from cached hostfile
    % x. a- Z( c& \7 |: [( D; Y
  6. * base: mirrors.tuna.tsinghua.edu.cn
    * p5 V, s* u# o
  7. * epel: mirrors.aliyun.com- \5 j: F  L& N) Z2 W3 B+ S/ n* A% G2 _& L
  8. * extras: mirrors.aliyun.com7 Q- J" C( ~9 n
  9. * updates: mirrors.aliyun.com
    3 @- T! V. C- K- m* q; \5 A  {! P
  10. Available Environment Groups:
    2 {5 |. m; P9 S& d+ a( y7 P
  11.    Minimal Install4 ]- l8 G- ^  g1 A7 s
  12.    Compute Node: ~8 t/ w( p3 ]. X+ Y
  13.    Infrastructure Server
    7 w9 j: j) f# f( R1 r) e$ z/ e
  14.    File and Print Server, t' Z, Q& _, `' D! ]$ h  F
  15.    Cinnamon Desktop- g7 M( r: t( r
  16.    MATE Desktop
    2 J$ r$ K% p& j% }. K# }
  17.    Basic Web Server
    % {/ B5 V/ L, I: `3 `
  18.    Virtualization Host9 g: @/ U' V2 P4 r; B; c
  19.    Server with GUI  P' p9 T& d8 K* q: s! \5 ~
  20.    GNOME Desktop
    . a6 S4 X/ i0 \5 U) Q
  21.    KDE Plasma Workspaces  b, o; |# m, `# r  i: n8 s
  22.    Development and Creative Workstation
    - r7 ^* A! h' n5 D$ m  Z0 B
  23. Available Groups:% ~9 q* o2 Z) N
  24.    Cinnamon/ z0 U4 @' b, _+ z
  25.    Compatibility Libraries
    / P; t4 N# g4 i" X
  26.    Console Internet Tools4 n2 D- J# d( k" m
  27.    Development Tools! x6 I* Q2 p0 i$ D& ~+ i7 S
  28.    Educational Software
    7 ?$ [& Q  [3 c8 R# q
  29.    Electronic Lab" S& k! P& ~; z5 M- ~% f* n
  30.    Fedora Packager- u+ `! _9 n( J; f. z5 ^8 V
  31.    General Purpose Desktop
    % ]* N2 L7 M7 A8 w* D3 O2 K8 S
  32.    Graphical Administration Tools
    ) g) K  l; M1 n/ n/ W  T) [8 ^
  33.    Haskell
    & z% x+ q! x+ [$ w
  34.    LXQt Desktop' G( m+ @% m5 d4 U- P5 k$ o+ y
  35.    Legacy UNIX Compatibility
    ; k2 G/ p4 e. L1 o3 i. `+ F- {4 t: b
  36.    MATE
    # I7 J" Z' V' x$ U1 L
  37.    Milkymist
    * A: o+ T9 R& k2 P. K+ o& j* s- p
  38.    Scientific Support
    $ P: [( b  K! `( R( f# r
  39.    Security Tools
    ( @) G. Z( h0 _6 b  J/ C$ L& D
  40.    Smart Card Support, x! M# c/ b- M/ e2 _
  41.    System Administration Tools" A3 u7 q* I, U) f0 `& \! J
  42.    System Management+ O1 ?# S5 l& n! x# Q' G, u) d( t
  43.    TurboGears application framework
    # I( j! L# u  S: V
  44.    Xfce
    : M4 E0 X  d4 b; H" q+ [
  45. Done
复制代码

0 k. U& H* X* l+ {; F8 R4 q% ^0 Q3 U. F, L  B
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:# @$ J$ [5 g7 l. z4 Y7 J: b, k
  1. [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
% z( d0 D7 y/ r- g4 y0 K$ I+ E7 t
9 a# z* w! k1 [% U+ ]" C
安装Xrdp  a4 n. T$ f# v/ y
  1. [root@localhost ~]# yum -y install xrdp
复制代码
" e* ~0 s+ E% m$ k6 r
4 g3 b/ @8 q/ R. P! G; {
安装完成之后,设置开机启动并启动xrdp  d. `; h0 T& Z5 \( U
  1. [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码

0 y% w$ T& [' L6 ?
: ~- g/ n. z) {( L4 _创建~/.Xclients,设置默认启动xfce4桌面2 U& l0 E9 g3 O, M9 H( I
  1. [root@localhost ~]# echo "xfce4-session" > ~/.Xclients# S2 _; H, {2 W: D* I" P; N
  2. [root@localhost ~]# chmod +x .Xclients
复制代码
7 |  H' _  O' U* \( [" J

, w) |+ D* H: x+ k6 x在客户端远程连接" `% R0 p$ C) c# D

3 X$ a" H% ^8 [( i
, f$ {$ A1 g* I5 r# q! v. w* J2 v+ Z2 T4 g' D% y. G, H& L
总结
5 z- E7 \; \" Z安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。' l$ A/ I* w9 b# m; w( W% V

) |6 O( b& q3 K- I) s& g: p/ [# R' f1 B, z& O5 M+ h% u
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2026-3-21 11:54 PM , Processed in 0.093387 second(s), 23 queries .

Powered by xyh-moon X3.5

© 2001-2025 Discuz! Team.

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