- 将repo配置中的地址替换为阿里云镜像站地址 sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel* sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
安装 xrdp 和 xorgxrdp
Xrdp是一个开源工具,允许用户通过 Windows RDP 访问 Linux 远程桌面。除了 Windows RDP,xrdp 工具还接受来自其他 RDP 客户端的连接,如 FreeRDP、rdesktop 和 NeutrinoRDP。Xrdp 现在支持 TLS 安全层。
修改配置文件 [root@localhost ~]# vim /etc/xrdp/xrdp.ini ... [Globals] ; xrdp.ini file version number ini_version=1
; fork a new process for each incoming connection fork=true
; ports to listen on, number alone means listen on all interfaces ; 0.0.0.0 or :: if ipv6 is configured ; space between multiple occurrences ; ALL specified interfaces must be UP when xrdp starts, otherwise xrdp will fail to start ; ; Examples: ; port=3389 ; port=unix://./tmp/xrdp.socket ; port=tcp://.:3389 127.0.0.1:3389 ; port=tcp://:3389 *:3389 ; port=tcp://<any ipv4 format addr>:3389 192.168.1.1:3389 ; port=tcp6://.:3389 ::1:3389 ; port=tcp6://:3389 *:3389 ; port=tcp6://{<any ipv6 format addr>}:3389 {FC00:0:0:0:0:0:0:1}:3389 ; port=vsock://<cid>:<port> port=3389 👈 【Global】下的port是远程连接桌面时开放的端口,windows远程连接必须开放3389
- 添加用户,设置密码 [root@localhost ~]# for i in {1..2}; do useradd stu$i; done [root@localhost ~]# for i in {1..2}; do echo redhat | passwd --stdin stu$i; done Changing password for user stu1. passwd: all authentication tokens updated successfully. Changing password for user stu2. passwd: all authentication tokens updated successfully.