|
|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。
, F, ~2 H" ^- _1 Z$ k! x ]' Y系统环境! a7 a3 `" c% u# ]3 Q8 |
- 服务端:Centos7.7 Minimal
- 客户端:Windows10
6 z0 M3 T/ T: e% R/ _ 安装桌面环境4 X4 `8 W s& e" T) ?
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。
0 e) K; N, ~9 I* H, W) m; U* z下面的命令列出可用环境组:
9 `$ ^0 G( U) \ M- [root@localhost ~]# yum grouplist
. b; @0 o( S0 \5 w3 f* p6 Y - Loaded plugins: fastestmirror
8 b6 _( @/ x- i& f5 X* ?' e( T - There is no installed groups file.3 n$ i7 u- Z, h, R# S' h
- Maybe run: yum groups mark convert (see man yum)
# G: F! j! L. { - Loading mirror speeds from cached hostfile
2 `9 C3 `: d; {$ l8 C! F - * base: mirrors.tuna.tsinghua.edu.cn
- |5 Z+ X4 }# T3 L; H' |* I. v# q - * epel: mirrors.aliyun.com. [. K. d: L, j
- * extras: mirrors.aliyun.com! E" O8 y" T9 C1 `3 g
- * updates: mirrors.aliyun.com
4 r/ Q1 P' r7 P6 { - Available Environment Groups:
& U! H+ ~; U' j f - Minimal Install- O6 l7 d& y V0 S& ^
- Compute Node! ^) t4 M; e0 a
- Infrastructure Server
+ _% w7 J6 V4 A - File and Print Server
. `& E: S/ N; c2 u - Cinnamon Desktop1 w$ a) L8 A3 \/ P2 B* Z
- MATE Desktop! g7 @1 ]% H/ F2 J, M: ^
- Basic Web Server( ?) a- ?) u9 V, q$ g9 Z
- Virtualization Host* D" C" A0 S$ I
- Server with GUI2 ^! d' t6 R0 x, p4 c
- GNOME Desktop. {( h) w. Q3 A. D
- KDE Plasma Workspaces
1 v! y3 x# x2 u S! U3 e - Development and Creative Workstation0 u+ |& ?5 X- a! Q- l2 D Q
- Available Groups:# t6 S6 H8 i6 H4 Q1 {+ |4 u! b
- Cinnamon
, b* `, i& _+ H3 ~2 _2 W6 Z - Compatibility Libraries4 F; c) Z& O5 Y) O3 q H3 J. Z
- Console Internet Tools
! n+ c; E8 a/ Z2 ^1 W p- m7 b# B9 P - Development Tools9 p/ o% @& l' j6 d5 j; @
- Educational Software* J0 Z% J6 F# c2 ]0 }- s
- Electronic Lab
0 F% s' x" A* p - Fedora Packager
K% E# M+ v- \ - General Purpose Desktop( N5 w9 A( z# l+ r9 O% R: o& r
- Graphical Administration Tools
# R. f: `% A% N8 x - Haskell
3 s O/ k7 [$ U; f - LXQt Desktop
. Y- u" O( A( p" p* X' q. x6 T - Legacy UNIX Compatibility
5 [& C$ ~: Y* m2 R1 F" l - MATE/ K7 C% X X9 `3 q
- Milkymist3 m" T" P: a: l, C
- Scientific Support
6 j# Z1 n2 @& F( W - Security Tools
" ]- z7 H( k# @6 Y8 y6 B - Smart Card Support
- o7 z6 C. ?4 `( z6 ?$ I/ i7 j - System Administration Tools
# S7 I: R7 v, \% V% m+ t - System Management; K- O' }1 q4 Q1 ], A
- TurboGears application framework
* x; E3 r+ F) [1 a+ }/ B - Xfce
6 D( B5 E" W' Q1 f - Done
复制代码
9 ?( L' b t4 z/ v6 l+ y/ o
% K4 f9 Z B% U: N& U我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:
" h" b1 [( }; M) f# R- m- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码 $ J0 {$ M7 q( |' M) R$ q* _
# f4 L# @6 \0 s5 h1 b2 f% R% L% c3 P A9 w% y安装Xrdp9 U7 s$ I3 @$ p {( C% @) k8 w8 _
- [root@localhost ~]# yum -y install xrdp
复制代码
: e3 [( N0 a; u6 b
$ H8 K2 f" D+ ~8 A, P' Q! b安装完成之后,设置开机启动并启动xrdp
( V9 R a1 E' r& s8 | c' Q: c$ b- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码 ) l' k* D% j) N8 |
; a+ m: Q f! @! r, r. @* k1 q) j1 k
创建~/.Xclients,设置默认启动xfce4桌面
4 l, V2 E* E, G* z$ C f ?; g( G# ~- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
2 p& J# a9 g, ]; T% S: _ - [root@localhost ~]# chmod +x .Xclients
复制代码
" j7 l- j, y: X$ P8 N) ?
$ I0 D; f8 y% `! K6 c/ z; m1 Z在客户端远程连接
+ f: p* r) ], K" E. l; C 6 A2 p2 ?4 t# X

% X7 K- J: v/ x0 P
) B, p2 |* c( m* l% Z# U$ a& d总结% q' u8 U0 N+ t- G/ y! T& u& S6 _
安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。; q) }; ^% x1 U0 w7 ]* I! M: ~4 K8 ~
0 ~; e3 _5 [9 b: A2 Q
5 s( _: n; J, U: r5 r. ? |
|