|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。
) }' w! n7 ~; f系统环境! Y7 r* E# F" X5 a" {# f& s
- 服务端:Centos7.7 Minimal
- 客户端:Windows101 z( J& c5 D( R
安装桌面环境" w) X2 _) K5 ]0 v7 L8 d- }& r) Q
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。: p! Q# i6 u1 N4 z2 M+ n
下面的命令列出可用环境组:
% g% H: m* V' d' N- x, |1 ]- [root@localhost ~]# yum grouplist1 F9 Z& a# U$ j. h
- Loaded plugins: fastestmirror+ K. c/ p+ Y1 u4 l$ L& @
- There is no installed groups file.
& ~8 h: y" c3 J( ~ - Maybe run: yum groups mark convert (see man yum)
5 ]( n; y f; T# R7 a - Loading mirror speeds from cached hostfile2 h! b2 p6 t6 @0 C {. H3 Q5 ~6 j
- * base: mirrors.tuna.tsinghua.edu.cn
1 @: L) Q( z9 k+ A$ r8 ^' v: m5 l - * epel: mirrors.aliyun.com
$ }5 k+ W; m# _, h - * extras: mirrors.aliyun.com
/ v/ M4 N3 F+ N$ _! L0 r& ` - * updates: mirrors.aliyun.com% u/ Z4 q/ p) E' I; H
- Available Environment Groups:7 @ ?9 ]$ I7 k# _# s2 W6 |$ h
- Minimal Install
3 W# _ x: G7 P9 P% @8 w- | - Compute Node$ u& d" P1 \- J
- Infrastructure Server# W" y' ^( S0 {
- File and Print Server
. f: f$ U) |2 ]9 `: [ - Cinnamon Desktop$ s2 D* b. }6 f9 W4 `
- MATE Desktop
' o& k5 l% w8 K( {! p/ |# o9 ~ - Basic Web Server
) V/ A: O" s7 H0 Q5 w - Virtualization Host
3 H* k4 ?! o9 B+ _* G, k7 g$ e7 y& x+ V - Server with GUI$ \% J/ a/ K- `3 o
- GNOME Desktop
6 S! J9 ?. H6 u - KDE Plasma Workspaces
; ~ w" S5 w$ L - Development and Creative Workstation
6 f* I' ?7 X4 I8 w) |, Y3 x - Available Groups:& F4 L7 |6 h% y7 q0 Q8 K
- Cinnamon
) M8 O- i9 h) e) q/ | - Compatibility Libraries
5 q0 @0 A0 f) H, U5 Z0 u6 Z. _4 e - Console Internet Tools
7 L& s+ w7 ]9 e* K& d - Development Tools
) p8 ?6 n8 _+ Z' c! n3 W1 e - Educational Software; C' n# Q/ t \7 ?) x( L
- Electronic Lab# F, _0 t: g- `" ]
- Fedora Packager! k+ \3 i0 {7 ]; N* X7 i. y
- General Purpose Desktop. H- y G+ F5 O1 ? A
- Graphical Administration Tools+ j& z1 ]! ]! m. c
- Haskell
5 i h, E3 B! w4 l7 g- o+ y - LXQt Desktop1 \7 p4 N" o' s) s9 `' F& l
- Legacy UNIX Compatibility( j: E: ]1 e0 i( a) {
- MATE: J, m6 t. ]$ i2 \1 z- f# ?
- Milkymist* l0 a; f8 o8 {( ^: G2 W0 s/ f
- Scientific Support
9 E+ c* U; \' L4 ]. ~ - Security Tools
( T& {# r1 N: ]) W6 s - Smart Card Support
- m% C* ^4 r" e L - System Administration Tools0 }# Q% d5 m7 @5 b& d) E& r
- System Management
# N. Y. X# @% e" `* |. ^' H" Z, { - TurboGears application framework
* c" F6 T% u& z. I. `% B* X - Xfce. K7 c) t5 ?6 ?
- Done
复制代码 ) v7 R( [# n3 o p" E
* L+ @; d5 ?8 ~2 Z0 |% t( E4 v
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:
, b5 P, _9 |) L. U r, H: E' V0 e- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
! S3 y3 Z/ t3 u+ C% L' e; c
1 X) d7 Z+ }* a6 P& T安装Xrdp
5 G) x, n( u8 s( S& r7 A- [root@localhost ~]# yum -y install xrdp
复制代码 ( b: [$ D, ^# e8 ]* f6 k+ y
( d6 n# K# H( G, t9 o' v
安装完成之后,设置开机启动并启动xrdp
" T+ t" m$ a% S4 d- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码
& Q& Q5 _6 j3 `- ?
" H. c" G5 o7 g" L* Y创建~/.Xclients,设置默认启动xfce4桌面
" J9 b" m- r ]" }% p1 u) x- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
+ }, T, N4 L9 n! M5 y$ B& e) c5 k - [root@localhost ~]# chmod +x .Xclients
复制代码
* A# C s- r) G }# E. _4 s% y" f2 \
在客户端远程连接
# z8 k: A5 i3 J1 S5 o, [9 K! ~/ {* B. z' P2 ?7 g
; V, f# W# C z6 [ ]6 v
6 f. ~" L+ G4 C, o2 Y8 l9 g总结
$ w8 m4 ?4 d/ D: F* o# {安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。+ o3 o+ ? ^3 _2 `* ?$ b
1 \; [7 M1 `& {+ T# Z! T
2 c* c. R7 t( f( A |
|