|
|
Xrdp是Microsoft远程桌面协议(RDP)的一个开源实现,它允许以图形方式控制远程系统。使用RDP,您可以登录到远程计算机并创建一个真正的桌面会话,就像您登录到本地计算机一样。$ j! v7 _7 h/ T7 b7 ` S6 @
系统环境
/ f/ ^9 t, N% n, w8 x' R( k4 p- 服务端:Centos7.7 Minimal
- 客户端:Windows10
9 Y5 G K5 }8 R/ e2 J 安装桌面环境
' Q% m0 \7 m& ^, b8 l7 h6 [- |本实验中安装的系统没有安装桌面环境,我们需要自己安装,如果已经安装桌面了清跳过这一步。Centos7提供了"Cinnamon Desktop","MATE Desktop","GNOME Desktop","KDE Plasma Workspaces","LXQt Desktop","Xfce"让我们安装。
0 f8 W, b" j' j1 a* h- n下面的命令列出可用环境组:
4 W" R; ]4 v4 n# J2 a- h2 A- [root@localhost ~]# yum grouplist. H, x) O- ?" `0 s
- Loaded plugins: fastestmirror! H9 e; U: U5 i. {) C0 Z
- There is no installed groups file.8 y' x* n; ?+ c6 r) H: y
- Maybe run: yum groups mark convert (see man yum)
' B' |- P+ a& V+ B: e5 `4 e' h - Loading mirror speeds from cached hostfile- g# L2 _3 ?3 a v5 Z3 h
- * base: mirrors.tuna.tsinghua.edu.cn x6 M0 O0 v, t/ I+ P
- * epel: mirrors.aliyun.com
% V' E7 U6 B. r/ l B - * extras: mirrors.aliyun.com
: E6 b' S% k' O J4 G% X4 ? - * updates: mirrors.aliyun.com
2 l8 J1 T+ Z+ s' [7 [: ` - Available Environment Groups:$ U( r: n# ]# w) W
- Minimal Install8 _# a# p- }: V u: z
- Compute Node+ u5 @: Y3 J: Y& `# X0 ?% j
- Infrastructure Server
# _0 r2 V8 u$ }2 J" V. l - File and Print Server
1 z, ?" t( n9 j - Cinnamon Desktop- P. i- E n) g# g; C+ W$ Z1 M7 b
- MATE Desktop' I& L1 |0 u5 K' ~" w
- Basic Web Server
2 X2 ~, X/ \. J# X! H# Q4 p: I9 B - Virtualization Host
* C1 D& _- V$ U0 k/ g - Server with GUI
^- y* t/ s3 { u& O - GNOME Desktop. l' I. @0 |, u
- KDE Plasma Workspaces
& u- s1 m2 j3 z6 Z, U9 Q - Development and Creative Workstation* |" g' ]8 `8 j& z& }) L8 ?+ p
- Available Groups:/ g7 z V8 b9 F. r
- Cinnamon
6 O& ?* I6 z+ \# U9 H% C% z - Compatibility Libraries
( B0 L" O0 E3 \% B' s* m - Console Internet Tools
* \2 ^( R! @% @- ~( r5 g - Development Tools
' R7 a% B6 r# ?% y' U - Educational Software
3 J4 c, a* E, t% I, ?$ o - Electronic Lab
( H! A( D/ W% T1 c& y - Fedora Packager
1 G4 \( s0 {& }1 L: F T e, s, y - General Purpose Desktop; _* G( d/ ~, w. t; Q
- Graphical Administration Tools
! W4 F- R- j$ X& O6 n D - Haskell% K0 }. I& b8 r3 E& k7 F5 g
- LXQt Desktop+ |3 @! r. z0 k& d8 x! {( V
- Legacy UNIX Compatibility
& B1 X& N2 I( b- A: t4 H* e+ l+ R - MATE- a' z2 G& ^# z* }7 G0 `
- Milkymist5 {0 i# ^1 ?" u7 d
- Scientific Support) Z+ u; H* h1 n4 _8 N0 O/ G! g \) M
- Security Tools$ T2 p0 z; ]& z
- Smart Card Support
. E S+ @" j+ f% Y3 P9 @, S4 e - System Administration Tools
7 f* E x: z% B" N4 n( I2 ~ - System Management
; A* [/ N, |8 Z - TurboGears application framework) f) k) D5 U# }& y& `. p& u1 i
- Xfce' s; m, W: \9 G5 U) ?9 u; o
- Done
复制代码 - r% C; h1 m/ n
W1 U. I: V1 G: s
我们可以选择自己喜欢的桌面环境,在这里选择安装Xfce桌面:" V, D7 Y$ X+ e' ?9 d
- [root@localhost ~]# yum -y install epel-release && yum groupinstall Xfce
复制代码
3 ^# l! L/ a0 U8 d1 l; |9 X
* q- E2 [) W% L9 Q4 ]' Z安装Xrdp( k A3 i# j+ Z0 w6 S& ]- { r( r
- [root@localhost ~]# yum -y install xrdp
复制代码
9 {) |, r5 k7 c) t7 B. q
8 ]- ^ R$ a. r/ c6 V7 c8 x8 q2 d' F安装完成之后,设置开机启动并启动xrdp
5 T; [8 X8 a. F- [root@localhost ~]# systemctl start xrdp && systemctl enable xrdp
复制代码 ( S/ o$ `7 X) E
0 q2 _2 u9 J8 r$ l0 S' N
创建~/.Xclients,设置默认启动xfce4桌面
) b- D) T6 M$ z h2 t J+ x! ]3 s- [root@localhost ~]# echo "xfce4-session" > ~/.Xclients
/ R2 p I5 Q' P# v+ A; E/ H - [root@localhost ~]# chmod +x .Xclients
复制代码 ( C, j3 U3 F3 p% j! i
7 G2 c- L1 w, Y
在客户端远程连接# r3 ^8 i d& k6 C6 N2 @7 l+ t
; s( W# X0 W8 P

# A e! M/ v$ U/ C% \# ? 8 R5 A. ?2 t" N2 j/ c; e. A, q
总结- y% p- E5 l" o7 d, ]
安装Xrdp服务器允许您通过图形界面从本地管理CentOS 7服务器。
( y- k8 ?* E6 S2 e ^! g* h
& H, a: B) U8 [$ p& F# m+ b2 ?3 d1 ^
. O; `( H1 A5 y1 \8 X" a- ~! t W3 H |
|