需要在局域网内进行
安装软件与开放端口
[root@MiWiFi-R3P-srv ~]# dnflocal install tigervnc-server
Last metadata expiration check: 1:09:18 ago on Wed 19 Jul 2023 06:35:08 PM CST.
Dependencies resolved.
==============================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================
Installing:
tigervnc-server x86_64 1.12.0-13.el9_2 media-appstream 259 k
Installing dependencies:
dbus-x11 x86_64 1:1.12.20-7.el9_1 media-appstream 24 k
tigervnc-selinux noarch 1.12.0-13.el9_2 media-appstream 25 k
tigervnc-server-minimal x86_64 1.12.0-13.el9_2 media-appstream 1.1 M
Transaction Summary
==============================================================================================================================================================================================
Install 4 Packages
Total size: 1.4 M
Installed size: 3.5 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: tigervnc-selinux-1.12.0-13.el9_2.noarch 1/4
Installing : tigervnc-selinux-1.12.0-13.el9_2.noarch 1/4
Running scriptlet: tigervnc-selinux-1.12.0-13.el9_2.noarch 1/4
Installing : dbus-x11-1:1.12.20-7.el9_1.x86_64 2/4
Installing : tigervnc-server-minimal-1.12.0-13.el9_2.x86_64 3/4
Installing : tigervnc-server-1.12.0-13.el9_2.x86_64 4/4
Running scriptlet: tigervnc-server-1.12.0-13.el9_2.x86_64 4/4
Verifying : dbus-x11-1:1.12.20-7.el9_1.x86_64 1/4
Verifying : tigervnc-server-minimal-1.12.0-13.el9_2.x86_64 2/4
Verifying : tigervnc-server-1.12.0-13.el9_2.x86_64 3/4
Verifying : tigervnc-selinux-1.12.0-13.el9_2.noarch 4/4
Installed:
dbus-x11-1:1.12.20-7.el9_1.x86_64 tigervnc-selinux-1.12.0-13.el9_2.noarch tigervnc-server-1.12.0-13.el9_2.x86_64 tigervnc-server-minimal-1.12.0-13.el9_2.x86_64
Complete!
[root@MiWiFi-R3P-srv ~]# firewall-cmd --add-port=5901-5910/tcp --permanent
success
[train@MiWiFi-R3P-srv root]$ vncserver
WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.
Warning: MiWiFi-R3P-srv:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server MiWiFi-R3P-srv:1
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
xauth: file /home/train/.Xauthority does not exist
New 'MiWiFi-R3P-srv:2 (train)' desktop is MiWiFi-R3P-srv:2
Creating default startup script /home/train/.vnc/xstartup
Creating default config /home/train/.vnc/config
Starting applications specified in /home/train/.vnc/xstartup
Log file is /home/train/.vnc/MiWiFi-R3P-srv:2.log
[train@MiWiFi-R3P-srv root]$ vncserver
WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.
Warning: MiWiFi-R3P-srv:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server MiWiFi-R3P-srv:1
New 'MiWiFi-R3P-srv:4 (train)' desktop is MiWiFi-R3P-srv:4
Starting applications specified in /home/train/.vnc/xstartup
Log file is /home/train/.vnc/MiWiFi-R3P-srv:4.log
[train@MiWiFi-R3P-srv root]$ vncserver -list
WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.
TigerVNC server sessions:
X DISPLAY # PROCESS ID
:2 287839
:3 288445
:4 289000
在win下下载VNC Viewer软件连接端口
192.168.31.251:5902
即可开启服务器的远程桌面
/home/lnw/.vnc/MiWiFi-R3P-srv:3.log #查看端口
网友评论