|
|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。& `' v3 s! H# M$ Y
系统环境$ D g: r( t8 a' z
- 服务端:Centos7.7 Minimal
- 客户端:Windows10
; o* x: d8 V3 u) G u+ X6 H. e6 ] 安装桌面环境7 a& q. B D; w, |2 G% ~, I4 ^
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。2 F, K' A0 T9 d( `: b0 i$ e: E( v
下面的命令列出可用环境组:/ H4 b! m/ v0 W9 }4 |6 I
- [root@localhost ~]# yum grouplist
4 _. r! n" ]$ R, y/ D+ f, w/ D - Loaded plugins: fastestmirror
8 m. |& Q" f3 b* s/ L, b! ~( m) ]5 D - There is no installed groups file.' ?1 Q+ q& a$ G) P" w
- Maybe run: yum groups mark convert (see man yum): m& B+ `' l; J- f: X" ]
- Loading mirror speeds from cached hostfile, { n1 {: \8 N# b; H7 F
- * base: mirrors.tuna.tsinghua.edu.cn* ]' _( b# \ b5 J1 M- ?
- * epel: mirrors.aliyun.com# |( u8 t" h2 g1 G5 N
- * extras: mirrors.aliyun.com
8 {, m3 t; C6 k9 F- K$ u/ Y - * updates: mirrors.aliyun.com
- }/ }. m1 q3 m7 E% D - Available Environment Groups:: w0 a% y1 {6 u. ^
- Minimal Install6 l; t) I4 Z7 N6 e
- Compute Node2 c& s) \( W7 P1 D$ m" d; d
- Infrastructure Server
# _/ q' g% F8 z6 a - File and Print Server
1 T1 u( j: {" W: r- {/ x9 B/ Q - Cinnamon Desktop0 L6 K& h5 y/ w7 p' Z4 m, u
- MATE Desktop
" @' n# V$ b y9 j2 M5 }' `+ u - Basic Web Server) Z8 w- i9 t6 w+ Y2 I) x" U
- Virtualization Host2 S! o8 |3 ~9 l: m2 e
- Server with GUI
. q4 y- n, W8 k6 F1 A4 G* ` - GNOME Desktop" G* g; N4 b* k9 K E* L+ s4 `
- KDE Plasma Workspaces
0 V" H' l/ c6 n; g: E+ a - Development and Creative Workstation) a) \7 y# s3 ?% o
- Available Groups:
: K7 {7 s0 w* F3 r. ] - Cinnamon h* V3 P" L1 p4 L* `
- Compatibility Libraries, N! A! y8 W8 _/ s. R
- Console Internet Tools4 A& b6 `9 t. s
- Development Tools% c' H0 N7 o3 J0 L& ~' F7 ^) b$ o
- Educational Software
+ o' \6 S* Y* z7 u! N" m. f - Electronic Lab
5 w: A: }/ C- {" {) s. w8 x - Fedora Packager" [8 Y6 t$ `- @" b; L/ Y
- General Purpose Desktop% f- ^5 V8 B( O% \
- Graphical Administration Tools
' h5 O1 Z/ e% T1 [+ _7 ?' C - Haskell
; g/ @* |4 a7 v0 ~* G - LXQt Desktop
. x# P0 A; N) U' h+ |. s - Legacy UNIX Compatibility
; D/ q: U! e8 A* j5 p; ?/ q - MATE6 ?+ M2 j9 [" v( n8 [" z- E) l' C
- Milkymist+ F: H4 S! u P' H$ q
- Scientific Support
- X( R5 S7 ?/ y: D/ J - Security Tools- F* z2 p0 \7 Q9 o1 U( \
- Smart Card Support
& a' z% W- S6 [/ r% m) c/ }6 X7 Z - System Administration Tools
, f8 o8 s1 r6 |8 T' f9 a - System Management
( U- ^- ?; T9 W. n5 [ - TurboGears application framework
& M- u& z M, S5 E - Xfce
: n$ X) h5 E0 U' ^( w: l+ P% m' t - Done
复制代码 ' b0 F- s% M6 k) }3 J/ y* x8 S
5 Z% F0 Z* I# u4 O5 i
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:) t* Q! R e5 V; I$ {; R2 S6 E; E3 w
- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码 % Q; ~$ i& O, a. {& ? n( P
5 F$ x- U; b. G6 R* T1 `; g9 o, G
安装Xrdp# C7 H6 b/ H6 [' V
- [root@localhost ~]# yum -y install xrdp
复制代码
& I$ q% G7 Q d% `' ^ L+ H, x# v* Q
: a6 v0 r3 R% G4 ~; o* n a8 z安装完成之后,设置开机启动并启动xrdp5 j$ s( B1 L- _: H+ }7 O/ h
- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码 D9 i& p7 S" G! f+ o
$ t! Y- |( Q. s* I. i9 L" z7 Z
创建~/.Xclients,设置默认启动xfce4桌面2 [& d+ [; s3 S, n& T
- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
w2 O1 {4 p+ \( R, Q& g - [root@localhost ~]# chmod +x .Xclients
复制代码
8 f7 l& q: r1 j3 d6 t1 d
' _* K! V1 ]0 ~; t" ?7 e/ K在客户端远程连接
* j2 Z0 ~4 _3 R
# P" b( x1 q7 P, O0 h* N 4 e; u4 {$ T8 C* |8 \
' m3 |' _0 K0 Q1 G0 ^2 ]8 g
总结
4 P5 Z7 K& S$ K' R' W, W) H安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
9 g1 [7 P1 Q9 C. B
* n# V) J3 M& ?3 J: \- R( W, p( C
) ?/ E: Z! {: T, b2 x |
|