|
|
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
- [root@localhost ~]# yum grouplist
* @( _' v) Q5 f6 k) s. q; g* S - Loaded plugins: fastestmirror
! N" W- n8 L( F - There is no installed groups file. d- ? J8 V" M
- Maybe run: yum groups mark convert (see man yum)' x9 a* W0 J( L8 Z0 i) f
- Loading mirror speeds from cached hostfile
p3 c& u: Z- l, i1 S6 A - * base: mirrors.tuna.tsinghua.edu.cn% z g' P9 x+ I
- * epel: mirrors.aliyun.com
/ S9 ?, w' \. A+ ?9 b$ V* [ - * extras: mirrors.aliyun.com. @3 f+ Y7 C5 R- N) {
- * updates: mirrors.aliyun.com
) |, x4 g2 E# _( F" t: T9 L - Available Environment Groups:; g1 D1 j0 \; o+ N0 s$ A
- Minimal Install1 Z& S+ |1 E' ?7 O: S
- Compute Node
4 d6 ^1 U1 i- y- L$ F - Infrastructure Server- W+ c' E X3 Q l8 `$ t$ c4 Y
- File and Print Server3 j& W3 ^5 L; L) @/ z
- Cinnamon Desktop
& j' z5 S0 D. P% ] - MATE Desktop8 \8 e6 l. T4 g" u: q( U6 O) C
- Basic Web Server
$ G, ?6 ~) w4 w3 b - Virtualization Host
/ w% G# _9 a" ]6 R7 Q0 B# t1 h9 B - Server with GUI
; h, ~0 @% Y! B3 z& U - GNOME Desktop
$ |" f \2 e9 w( g+ }8 T, S% q - KDE Plasma Workspaces
5 z' m6 X7 p( a3 b3 @3 V* I - Development and Creative Workstation9 N6 K6 D+ M2 o6 p0 Z. b* M
- Available Groups:* z3 T, s8 a3 D- H5 _
- Cinnamon
, o( y+ }, q0 c3 O% _; l - Compatibility Libraries
* h1 N0 s) M# p7 S$ j& G - Console Internet Tools9 n2 b7 Y" D' @) M' y) o9 A
- Development Tools
$ E3 {! g" `/ G U( l6 H - Educational Software$ w8 F$ b9 t- R
- Electronic Lab
6 I% a# |/ x1 v) \8 W1 _ - Fedora Packager% w* v6 D' @; } e
- General Purpose Desktop
' _) b6 `7 B' Y3 y' n6 j. \ - Graphical Administration Tools S" R2 O% X. u5 u# ^
- Haskell
, X6 \7 K1 b: ~" _ - LXQt Desktop% w: a) w- u( j% u7 b
- Legacy UNIX Compatibility) K$ Y* ` l4 T( U) ~; v
- MATE) ?$ S" E( b/ S o6 J$ }4 _
- Milkymist0 x( ~; G$ n" `% |9 u& e# B
- Scientific Support
& C9 U8 [3 a1 A1 ?$ i) [ - Security Tools2 t9 |; a- A7 X' ?, m' R
- Smart Card Support
5 M) M- u c5 e3 K; j) Y$ U - System Administration Tools
+ k' Y6 F# X' Y9 J% c - System Management
, S; N' f+ _# C. U2 P - TurboGears application framework
4 M3 l- E+ v1 |# p - Xfce& G8 v( Z5 S2 K& K( O+ F$ a
- Done
复制代码 9 p1 _, ]2 Y7 W
2 B: W% {6 `0 N; N2 H, A
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:8 P6 c) d x. |
- [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
- [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 ?- [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
- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients ?9 B% q0 W# c9 P4 c6 ^0 c8 _3 \7 o
- [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+ ~
|
|