王海庆的云笔记

TigerVNC更新到1.12.0版本


官网

https://github.com/TigerVNC/tigervnc
https://tigervnc.org/
https://sourceforge.net/projects/tigervnc/files/beta/1.9beta/

https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/el7/RPMS/x86_64/
https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/el7/RPMS/noarch/


centos7默认安装的1.8.0版本

[whq@zouxiaodong14 ~]$ rpm -qa|grep vnc
tigervnc-server-minimal-1.8.0-21.el7.x86_64
gvnc-0.7.0-3.el7.x86_64
gtk-vnc2-0.7.0-3.el7.x86_64
tigervnc-server-1.8.0-22.el7.x86_64
tigervnc-license-1.8.0-21.el7.noarch


关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
sed -i -e  's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0


换成阿里云的源

rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo


创建本地源

tar zxvf TigerVNC-1.12.0.tar.gz -C /opt

cat >  /etc/yum.repos.d/tigervnc.repo << EOF
[tigervnc]
name=tigervnc
baseurl=file:///opt/TigerVNC-1.12.0
enabled=1
gpgcheck=0
EOF


重建索引

yum clean all
yum makecache fast -y


安装VNC服务软件,使用root用户执行以下命令(以下操作没有特别说明均在root用户) 

yum install tigervnc-server -y


设置root的vnc登录密码

vncpasswd <<EOF
123456
123456
n
EOF


创建用户(可选)

# 创建用户
useradd whq

# 设置用户登录密码
passwd whq
或
echo '123456'|passwd --stdin whq

# 切换用户
su whq

# 设置此用户的vnc密码
vncpasswd <<EOF
123456
123456
n
EOF

# 切回root用户下
exit


添加用户  

cat >> /etc/tigervnc/vncserver.users << EOF
:1=root
:2=whq
EOF


设置单个用户分辨率(与全局参数同时存在时,此参数优先级更高)

echo "geometry=1920x1080" >> /root/.vnc/config
echo "geometry=1920x1080" >> /home/whq/.vnc/config


启动服务

systemctl daemon-reload
systemctl restart vncserver@:1.service
systemctl enable  vncserver@:1.service
systemctl status  vncserver@:1.service

systemctl daemon-reload
systemctl restart vncserver@:2.service
systemctl enable  vncserver@:2.service
systemctl status  vncserver@:2.service


查看端口是否监听 

netstat -lnpt|grep Xvnc


TigerVNC-1.12.0.tar.gz

文章最后更新时间: 2022-01-11 15:51:15