作者:admin 日期:2023-09-10 浏览: 次
干货:银河麒麟服务器V10安装tigervnc
前言:本文介绍如何在银河麒麟高级服务器操作系统V10上安装tigervnc-server及在客户端使用,请大家多多点赞、收藏、评论、关注哦!
yum安装指令
sudo yum install -y tigervnc-server
复制服务文件
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/
替换
/etc/systemd/system/vncserver@.service中的<USER>标签为当前用户(非root)并配置分辨率参数
sudo vim /etc/systemd/system/vncserver@.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/home/yeqiang
User=yeqiang
Group=yeqiang
PIDFile=/home/yeqiang/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver %i -geometry 2560x1080
ExecStop=/usr/bin/vncserver -kill %i
Restart=on-success
RestartSec=15
[Install]
WantedBy=multi-user.target
防火墙放行5901/tcp端口
sudo firewall-cmd --permanent --add-port=5901/tcp
启动服务
[yeqiang@192-168-110-185 system]$ sudo systemctl daemon-reload
[yeqiang@192-168-110-185 system]$ sudo systemctl start vncserver@:1.service
[yeqiang@192-168-110-185 system]$ vncserver -list
TigerVNC server sessions:
X DISPLAY # PROCESS ID
:1 94402
[yeqiang@192-168-110-185 system]$ ps aux | grep Xvnc
yeqiang 94402 6.4 0.8 772928 134208 ? Sl 14:55 0:01 /usr/bin/Xvnc :1 -auth /home/yeqiang/.Xauthority -desktop 192-168-110-185:1 (yeqiang) -fp catalogue:/etc/X11/fontpath.d -geometry 2560x1080 -pn -rfbauth /home/yeqiang/.vnc/passwd -rfbport 5901 -rfbwait 30000
yeqiang 95040 0.0 0.0 214080 1536 pts/0 S+ 14:55 0:00 grep Xvnc
注意:
1.被启动的服务是vncserver@:1.service
2. 首次启动会提示输入密码,按照引导输入登陆密码
3. 可以通过 systemctl enable vncserver@:1.service 设置开启启动
1.安装tigervnc客户端软件
sudo yum install -y tigervnc
2. 连接到目标服务器
[yeqiang@harbor ~]$ vncviewer 192.168.110.185:1
TigerVNC Viewer 64-bit v1.10.1
Built on: 2020-04-19 00:00
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Thu Jan 21 14:57:14 2021
DecodeManager: Detected 6 CPU core(s)
DecodeManager: Creating 4 decoder thread(s)
CConn: Connected to host 192.168.110.185 port 5901
无锡数据恢复
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
扬州数据恢复
CConnection: Choosing security type VeNCrypt(19)
CVeNCrypt: Choosing security type TLSVnc (258)
Thu Jan 21 14:57:17 2021
DesktopWindow: Adjusting window size to avoid accidental full screen request
CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
银河麒麟高级服务器操作系统V10上安装部署tigervnc-server与x86 CentOS没有太大差异。