|
|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。' @( I9 b4 Z! c' X- }
系统环境
3 k$ s' V9 x& G: G: W- A$ k- 服务端:Centos7.7 Minimal
- 客户端:Windows10
- f8 m7 F' c n! }3 Y) a+ C 安装桌面环境7 U: z V' h6 E+ u8 z# f
本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。
2 m/ e5 A7 \/ I: T下面的命令列出可用环境组:( h8 c7 U' h( K0 E: P
- [root@localhost ~]# yum grouplist, E t! y: d: `8 k
- Loaded plugins: fastestmirror
9 G/ X( J; ~5 W - There is no installed groups file.
+ [, z) l6 q' d9 K7 Y - Maybe run: yum groups mark convert (see man yum)8 q9 \; }; s" v0 H$ |& P+ h1 n
- Loading mirror speeds from cached hostfile/ _+ J5 ?3 B9 q8 _! N/ x
- * base: mirrors.tuna.tsinghua.edu.cn
$ B# u% Z* ?1 k7 g - * epel: mirrors.aliyun.com
~1 V( C& g" ]* r- m# ?% c - * extras: mirrors.aliyun.com8 V( ]: h2 T! O. n/ G+ W
- * updates: mirrors.aliyun.com# U" j6 ]7 f$ V
- Available Environment Groups:+ o3 M" s; |; N; @" D7 l
- Minimal Install
) w" E2 M0 p) k, O: }, K - Compute Node8 t" y: O. G2 w" t
- Infrastructure Server1 p& q9 a7 S1 G. _& m
- File and Print Server
, }7 J5 _3 Z) x! ?4 c+ r3 u - Cinnamon Desktop
& t d( Z/ y L& A8 b- h" B - MATE Desktop- O7 t' ^: P" N; u1 o% G$ M4 g
- Basic Web Server, }8 A$ f# k& A5 B, }; I! F
- Virtualization Host, x0 k3 Q5 l& J. b4 f! ?" m9 h
- Server with GUI
* {" U d+ ~& T1 `% Y, z7 f, m3 w7 x - GNOME Desktop
1 G2 n2 x6 n( o9 _' L - KDE Plasma Workspaces# B* e4 L! m2 P7 K
- Development and Creative Workstation. W5 Z* n# B2 k% C2 h2 `
- Available Groups:
; }# e. a4 p9 V& B2 f - Cinnamon7 _/ B$ ]7 |$ m0 s$ z
- Compatibility Libraries: C% d# {& X1 w, h6 A
- Console Internet Tools
- z! T' ?; ^/ v) x& _) y - Development Tools
3 ^4 L' r6 P) H% F' Z4 D) D8 f - Educational Software: ~1 V7 v8 D+ c G" {( x0 u
- Electronic Lab
( d) c0 K% n$ ^( ]/ Y" G( B, N - Fedora Packager" Q( m) W( B! @+ T4 o( C
- General Purpose Desktop. J9 p v2 d2 ~* w
- Graphical Administration Tools
% \/ L1 J4 H6 E5 ^/ c) @" Q, z - Haskell0 `7 q; h' D; e. R+ r
- LXQt Desktop
! _) J- N4 Y' A+ S: t# X: [7 [1 i - Legacy UNIX Compatibility, E2 j: D6 X3 { P& f- B2 k G; v
- MATE% P7 U( i1 W @- l$ z- p! Y5 m0 E
- Milkymist
3 K5 W3 [& F( s - Scientific Support
) r" r( d, M8 j' |1 x - Security Tools
) m; z3 w/ [* B9 B3 E - Smart Card Support
+ Y. m, Z5 V" z - System Administration Tools; ~1 e. Z& x3 g m j9 h% I9 @8 }
- System Management
$ Z d7 x* P" Q- @ - TurboGears application framework- E3 q6 R& ^/ Z
- Xfce
9 J. r* o% F" ^# B& e - Done
复制代码
/ U3 b2 C% E1 m0 d/ o: @" [, E% _
8 p2 _2 X+ P' X/ h; X我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:
% ?2 U( y3 l2 _" p) ~" P8 g- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
4 u+ g4 @- ^. w
8 j( \* ?0 P8 b; R4 T, O; i安装Xrdp
# Q, f/ @. u# L: B2 z& _- [root@localhost ~]# yum -y install xrdp
复制代码
+ Y1 d V9 s, K5 g5 x8 y2 e+ a. o$ [0 q
安装完成之后,设置开机启动并启动xrdp& F& P+ M5 O' T4 m% X$ d) Q+ j
- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码
' q- ~2 a" a' U" ^2 W! W
/ I9 ^% h( v0 h9 } I! m7 A创建~/.Xclients,设置默认启动xfce4桌面
8 H+ u) @, a o+ Y; t: T; B- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients+ `0 l% @$ F, c x
- [root@localhost ~]# chmod +x .Xclients
复制代码 3 c6 [9 i* v. \+ \6 ~
: d) n' h: e! p$ N
在客户端远程连接0 C7 `! n" d3 S

) K! f1 p# t# g/ f, x6 q 9 n' V. ` W S; l( ~" d/ z% J
- K+ B9 D! w: c" W
总结
" j- i5 N8 ~3 b* C" m" a, ]+ _: m! ?安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
6 C' f* M/ C4 A+ @6 m0 V4 \% J& ~8 \+ }/ t- \7 R) C3 j$ a6 {0 q
! _7 Q2 G: s4 n9 Y
|
|