统信服务器操作系统【VNC工具安装及远程控制】解决方案
功能概述在统信服务器操作系统中安装VNC工具用于实现从Windows侧系统上使用VNC Viewer等软件远程登录桌面访问UOS服务器操作系统。由于服务器操作系统各版本之间存在差异因此安装配置过程分别针对不同的系统版本进行了举例说明请读者注意根据系统版本区分安装步骤。应用场景硬件/整机信息全平台OS版本信息服务器操作系统D、A、E等版本软件信息x11vnc 远程控制类工具安装步骤一、【a/e版】安装x11vnc前置条件1确认系统已安装有图形化可接入显示器或通过虚拟控制台确认2root用户执行以下所有命令步骤1关闭本机防火墙命令较多可直接复制粘贴请勿手敲以防敲错[rootlocalhost ~]# systemctl stop firewalld ; systemctl disable firewalld [rootlocalhost ~]# systemctl stop ebtables ; systemctl disable ebtables [rootlocalhost ~]# systemctl stop iptables ; systemctl disable iptables [rootlocalhost ~]# systemctl stop ip6tables ; systemctl disable ip6tables [rootlocalhost ~]# systemctl stop nftables ; systemctl disable nftables [rootlocalhost ~]# systemctl mask firewalld [rootlocalhost ~]# systemctl mask ebtables [rootlocalhost ~]# systemctl mask iptables [rootlocalhost ~]# systemctl mask ip6tables [rootlocalhost ~]# systemctl mask nftables注意上述指令会关闭并停用相关防火墙服务同时将屏蔽防火墙服务。步骤2安装软件包[rootlocalhost ~]# yum install x11vnc步骤3修改配置文件需注释掉文件所有的原内容后粘贴以下内容以下配置内容中vnc使用的端口是5900网络防火墙需要注意提前放行[rootlocalhost ~]# vim /lib/systemd/system/x11vnc.service [Unit] DescriptionStart x11vnc at startup. Aftermulti-user.target [Service] Typesimple 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} RemainAfterExityes [Install] WantedBymulti-user.target步骤4配置vnc密码[rootlocalhost ~]# x11vnc -storepasswd [rootlocalhost ~]# mv ~/.vnc/passwd /etc/x11vnc.pwd步骤5启动服务[rootlocalhost ~]# systemctl daemon-reload [rootlocalhost ~]# systemctl enable x11vnc [rootlocalhost ~]# systemctl restart x11vnc二、【d版】安装x11vnc前置条件1确认系统已安装有图形化可接入显示器或通过虚拟控制台确认2root用户执行以下所有命令步骤1关闭本机防火墙命令较多直接复制粘贴请勿手敲以防敲错[rootlocalhost ~]# systemctl stop firewalld ; systemctl disable firewalld [rootlocalhost ~]# systemctl stop ebtables ; systemctl disable ebtables [rootlocalhost ~]# systemctl stop iptables ; systemctl disable iptables [rootlocalhost ~]# systemctl stop ip6tables ; systemctl disable ip6tables [rootlocalhost ~]# systemctl stop nftables ; systemctl disable nftables [rootlocalhost ~]# systemctl mask firewalld [rootlocalhost ~]# systemctl mask ebtables [rootlocalhost ~]# systemctl mask iptables [rootlocalhost ~]# systemctl mask ip6tables [rootlocalhost ~]# systemctl mask nftables注意上述指令会关闭并停用相关防火墙服务同时将屏蔽防火墙服务。步骤2安装软件包[rootlocalhost ~]# apt update [rootlocalhost ~]# apt install -y x11vnc步骤3修改配置文件需注释掉文件所有的原内容后粘贴以下内容以下配置内容中vnc使用的端口是5900网络防火墙需要注意提前放行[rootlocalhost ~]# vim /lib/systemd/system/x11vnc.service [Unit] DescriptionStart x11vnc at startup. Aftermulti-user.target [Service] Typesimple 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} RemainAfterExityes [Install] WantedBymulti-user.target步骤4配置vnc密码[rootlocalhost ~]# x11vnc -storepasswd [rootlocalhost ~]# mv ~/.vnc/passwd /etc/x11vnc.pwd步骤5启动服务[rootlocalhost ~]# systemctl daemon-reload [rootlocalhost ~]# systemctl enable x11vnc [rootlocalhost ~]# systemctl restart x11vnc