功能概述
在统信服务器操作系统中安装VNC工具,用于实现从Windows侧系统上使用VNC Viewer等软件远程登录桌面访问UOS服务器操作系统。
由于服务器操作系统各版本之间存在差异,因此安装配置过程分别针对不同的系统版本进行了举例说明,请读者注意根据系统版本区分安装步骤。
应用场景
硬件/整机信息:全平台
OS版本信息:服务器操作系统D、A、E等版本
软件信息:x11vnc 远程控制类工具
安装步骤
一、【a/e版】安装x11vnc
前置条件:
(1)确认系统已安装有图形化,可接入显示器或通过虚拟控制台确认;
(2)root用户执行以下所有命令;
步骤1:关闭本机防火墙
(命令较多,可直接复制粘贴,请勿手敲,以防敲错)
[root@localhost ~]# systemctl stop firewalld ; systemctl disable firewalld
[root@localhost ~]# systemctl stop ebtables ; systemctl disable ebtables
[root@localhost ~]# systemctl stop iptables ; systemctl disable iptables
[root@localhost ~]# systemctl stop ip6tables ; systemctl disable ip6tables
[root@localhost ~]# systemctl stop nftables ; systemctl disable nftables
[root@localhost ~]# systemctl mask firewalld
[root@localhost ~]# systemctl mask ebtables
[root@localhost ~]# systemctl mask iptables
[root@localhost ~]# systemctl mask ip6tables
[root@localhost ~]# systemctl mask nftables
注意:上述指令会关闭并停用相关防火墙服务,同时将屏蔽防火墙服务。
步骤2:安装软件包
[root@localhost ~]# yum install x11vnc
步骤3:修改配置文件
(需注释掉文件所有的原内容后,粘贴以下内容)
以下配置内容中vnc使用的端口是5900,网络防火墙需要注意提前放行:
[root@localhost ~]# vim /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared
ExecStop=/bin/kill ${MAINPID}
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
步骤4:配置vnc密码
[root@localhost ~]# x11vnc -storepasswd
[root@localhost ~]# mv ~/.vnc/passwd /etc/x11vnc.pwd
步骤5:启动服务
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl enable x11vnc
[root@localhost ~]# systemctl restart x11vnc
二、【d版】安装x11vnc
前置条件:
(1)确认系统已安装有图形化,可接入显示器或通过虚拟控制台确认;
(2)root用户执行以下所有命令;
步骤1:关闭本机防火墙
(命令较多,直接复制粘贴,请勿手敲,以防敲错)
[root@localhost ~]# systemctl stop firewalld ; systemctl disable firewalld
[root@localhost ~]# systemctl stop ebtables ; systemctl disable ebtables
[root@localhost ~]# systemctl stop iptables ; systemctl disable iptables
[root@localhost ~]# systemctl stop ip6tables ; systemctl disable ip6tables
[root@localhost ~]# systemctl stop nftables ; systemctl disable nftables
[root@localhost ~]# systemctl mask firewalld
[root@localhost ~]# systemctl mask ebtables
[root@localhost ~]# systemctl mask iptables
[root@localhost ~]# systemctl mask ip6tables
[root@localhost ~]# systemctl mask nftables
注意:上述指令会关闭并停用相关防火墙服务,同时将屏蔽防火墙服务。
步骤2:安装软件包
[root@localhost ~]# apt update
[root@localhost ~]# apt install -y x11vnc
步骤3:修改配置文件
(需注释掉文件所有的原内容后,粘贴以下内容)
以下配置内容中vnc使用的端口是5900,网络防火墙需要注意提前放行:
[root@localhost ~]# vim /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared
ExecStop=/bin/kill ${MAINPID}
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
步骤4:配置vnc密码
[root@localhost ~]# x11vnc -storepasswd
[root@localhost ~]# mv ~/.vnc/passwd /etc/x11vnc.pwd
步骤5:启动服务
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl enable x11vnc
[root@localhost ~]# systemctl restart x11vnc
三、Windows端VNC Client工具
Windows端可使用如下VNC-Viewer工具安装包,安装完毕之后可通过VNC Viewer远程连接到上诉已配置VNC的服务器操作系统:
©统信软件技术有限公司。访问者可将本网站提供的内容或服务用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯本网站及相关权利人的合法权利。除此以外,将本网站任何内容或服务进行转载,须备注:该文档出自【faq.uniontech.com】统信软件知识分享平台。否则统信软件将追究相关版权责任。