|
|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。' k! p4 K* f4 E3 I# m
系统环境
5 r7 q( @9 O+ l- 服务端:Centos7.7 Minimal
- 客户端:Windows105 ]: K5 n$ o2 W0 h& k
安装桌面环境
# M7 U6 A# N& @, v本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。' V! @/ ]+ W$ A% [/ t
下面的命令列出可用环境组:
* w+ x! i+ R" P: o: c- [root@localhost ~]# yum grouplist
& I' v- Q5 `7 _0 [* Z+ d( H1 F - Loaded plugins: fastestmirror9 u( o% ` p! `2 O1 ~4 |/ Y
- There is no installed groups file.. @, c% p8 A# T. a
- Maybe run: yum groups mark convert (see man yum)' R; F# {! J' Y0 ~" V5 p
- Loading mirror speeds from cached hostfile9 M5 o) {3 {9 H8 S, `* h
- * base: mirrors.tuna.tsinghua.edu.cn
* S6 c% p! E y* W/ e - * epel: mirrors.aliyun.com
5 M# P7 \7 l- d4 l4 D - * extras: mirrors.aliyun.com/ ^0 F. r0 n8 ]( K
- * updates: mirrors.aliyun.com+ `- w( k3 `. [. A. O/ Z( b
- Available Environment Groups:
0 g. _; @2 y6 G1 r! X - Minimal Install
7 M+ k5 g/ [% ~3 R, S; w - Compute Node
% F" Z3 t8 R; r, r/ F5 U V - Infrastructure Server* }) G( z0 H1 C5 W
- File and Print Server
% c A) C, w8 \6 r - Cinnamon Desktop
2 v$ ?3 t C5 N; F, j4 ^ - MATE Desktop
1 ?% X' w/ s7 _* ~/ e- u - Basic Web Server
- Q7 H. A7 \0 V/ B, @9 N4 q - Virtualization Host
* O' J+ a' { r, u" G - Server with GUI
R) _4 {4 Z3 a4 Q }. x! g8 Y - GNOME Desktop
/ \' }- I7 G2 Q - KDE Plasma Workspaces& i9 ]. p7 Z" W3 Z" k Y2 A, D
- Development and Creative Workstation
' l: z; W" k( b& x - Available Groups:
3 I r- n% E6 H0 u - Cinnamon. I# N" M$ t4 g! _6 U
- Compatibility Libraries
5 b: C) f8 a; B# N2 u - Console Internet Tools* K2 ?6 J( H0 y/ h& |% \" ]' `. J7 a) [
- Development Tools
}" Q- z2 `3 n& z - Educational Software# N) R9 n& N# T. G" A
- Electronic Lab0 O% ?) i+ ~/ v( o* W# u- t
- Fedora Packager
( N+ n$ \$ W5 i - General Purpose Desktop
5 }4 I; O7 \5 U# q7 ]4 Y - Graphical Administration Tools
) D" `3 q* y7 Z1 d7 c% g0 K3 K' J. U4 g - Haskell
7 N; x4 I( M) Z - LXQt Desktop
: T, l6 g" F* l( d - Legacy UNIX Compatibility
- P4 ^. I+ ^. q - MATE
/ U: }, ]8 M5 e+ V - Milkymist. }& y) b+ M- }) b9 |
- Scientific Support7 K E t0 K! f X. x, V) l1 [
- Security Tools* J7 t1 e0 R4 H. {$ I
- Smart Card Support c$ ]; h, p8 m/ c( e$ n. m2 Y3 R F
- System Administration Tools( \2 A: ~1 q- D5 E8 P
- System Management
* \+ o3 V4 Q+ ^; q2 Q+ f4 `/ L( x - TurboGears application framework, n6 @; _+ Q# _8 }
- Xfce0 P7 w! Y+ P9 U
- Done
复制代码 ' v8 ?( k( D3 x" t
9 X8 X# N- ^% _ h+ P+ ^ k: w
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:3 E% R. W# M9 S: r) V
- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
$ U1 n* Q+ I: W0 w& N3 I: r" J2 O9 i$ T: r4 U3 o( b) S# n) |* Q5 p# m
安装Xrdp
; ^0 S) S2 B. S& e, k) w- [root@localhost ~]# yum -y install xrdp
复制代码 ; d8 N3 B- p0 S
" j2 F! P# z! g' P+ a( R安装完成之后,设置开机启动并启动xrdp4 m( Q( {# y2 V, p. L V3 U
- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码 7 R4 K' U) T/ B0 E- P, t8 F$ m
8 e& Z, P) j9 O5 L: I' C( u9 k" T9 K创建~/.Xclients,设置默认启动xfce4桌面+ {& h4 j& i/ {% `# G: B
- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients/ r; i3 s! b0 C' ?6 u0 `
- [root@localhost ~]# chmod +x .Xclients
复制代码 + C+ c/ f& r+ N& A2 H
$ w7 Q3 { r9 H6 O; g# w- M在客户端远程连接, `7 R M# R7 x7 d' W8 [
# I1 I: Z$ O$ M! J5 U4 G7 k
9 B3 k- d" J5 f# A

# k# d5 R1 `- I& G, r% z, ]总结
$ e3 n, C1 e: H/ C& b7 [0 R安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
5 W, M, G. Z1 g; V3 V- g+ Y) ^0 U) C$ r
P3 R$ s5 a \) E) d- @
) E {# B2 n/ W5 M* D' }' Y/ r; K |
|