|
|
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- [root@localhost ~]# yum grouplist; d4 q$ s5 U6 I
- Loaded plugins: fastestmirror
5 ^. T6 [# B' L+ b - There is no installed groups file.
' G$ x3 ?1 H; ?: z: ? - Maybe run: yum groups mark convert (see man yum)
, |! ]+ @5 i' K7 ~ - Loading mirror speeds from cached hostfile
% x. a- Z( c& \7 |: [( D; Y - * base: mirrors.tuna.tsinghua.edu.cn
* p5 V, s* u# o - * epel: mirrors.aliyun.com- \5 j: F L& N) Z2 W3 B+ S/ n* A% G2 _& L
- * extras: mirrors.aliyun.com7 Q- J" C( ~9 n
- * updates: mirrors.aliyun.com
3 @- T! V. C- K- m* q; \5 A {! P - Available Environment Groups:
2 {5 |. m; P9 S& d+ a( y7 P - Minimal Install4 ]- l8 G- ^ g1 A7 s
- Compute Node: ~8 t/ w( p3 ]. X+ Y
- Infrastructure Server
7 w9 j: j) f# f( R1 r) e$ z/ e - File and Print Server, t' Z, Q& _, `' D! ]$ h F
- Cinnamon Desktop- g7 M( r: t( r
- MATE Desktop
2 J$ r$ K% p& j% }. K# } - Basic Web Server
% {/ B5 V/ L, I: `3 ` - Virtualization Host9 g: @/ U' V2 P4 r; B; c
- Server with GUI P' p9 T& d8 K* q: s! \5 ~
- GNOME Desktop
. a6 S4 X/ i0 \5 U) Q - KDE Plasma Workspaces b, o; |# m, `# r i: n8 s
- Development and Creative Workstation
- r7 ^* A! h' n5 D$ m Z0 B - Available Groups:% ~9 q* o2 Z) N
- Cinnamon/ z0 U4 @' b, _+ z
- Compatibility Libraries
/ P; t4 N# g4 i" X - Console Internet Tools4 n2 D- J# d( k" m
- Development Tools! x6 I* Q2 p0 i$ D& ~+ i7 S
- Educational Software
7 ?$ [& Q [3 c8 R# q - Electronic Lab" S& k! P& ~; z5 M- ~% f* n
- Fedora Packager- u+ `! _9 n( J; f. z5 ^8 V
- General Purpose Desktop
% ]* N2 L7 M7 A8 w* D3 O2 K8 S - Graphical Administration Tools
) g) K l; M1 n/ n/ W T) [8 ^ - Haskell
& z% x+ q! x+ [$ w - LXQt Desktop' G( m+ @% m5 d4 U- P5 k$ o+ y
- Legacy UNIX Compatibility
; k2 G/ p4 e. L1 o3 i. `+ F- {4 t: b - MATE
# I7 J" Z' V' x$ U1 L - Milkymist
* A: o+ T9 R& k2 P. K+ o& j* s- p - Scientific Support
$ P: [( b K! `( R( f# r - Security Tools
( @) G. Z( h0 _6 b J/ C$ L& D - Smart Card Support, x! M# c/ b- M/ e2 _
- System Administration Tools" A3 u7 q* I, U) f0 `& \! J
- System Management+ O1 ?# S5 l& n! x# Q' G, u) d( t
- TurboGears application framework
# I( j! L# u S: V - Xfce
: M4 E0 X d4 b; H" q+ [ - 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
- [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
- [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
- [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
- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients# S2 _; H, {2 W: D* I" P; N
- [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* J 2 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
|
|