王海庆的云笔记

CentOS6安装 TigerVNC1.10.1


官网

https://github.com/TigerVNC/tigervnc
https://tigervnc.org/

https://sourceforge.net/projects/tigervnc/files/stable/1.10.1/el6/RPMS/


centos6默认安装的1.1.0版本,最新的支持到1.10.1


关闭防火墙

chkconfig iptables off
service iptables stop

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


公司里CentOS6的源 

rm -rf /etc/yum.repos.d/*
cat >  /etc/yum.repos.d/centos6.repo << EOF
[base]
name=base
baseurl=http://172.18.0.68/centos6/base
enabled=1
gpgcheck=0

[extras]
name=extras
baseurl=http://172.18.0.68/centos6/extras
enabled=1
gpgcheck=0

[updates]
name=updates
baseurl=http://172.18.0.68/centos6/updates
enabled=1
gpgcheck=0

[epel]
name=epel
baseurl=http://172.18.0.68/centos6/epel
enabled=1
gpgcheck=0
EOF

yum clean all
yum makecache fast -y


将压缩包解压,并进入目录执行如下命令安装

yum install *.rpm


设置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/sysconfig/vncservers << 'EOF'
VNCSERVERS="1:root 2:whq" VNCSERVERARGS[1]="-geometry 1980x1080" VNCSERVERARGS[2]="-geometry 1900x1000" EOF


启动服务

chmod +rwx /etc/init.d/vncserver

service vncserver start
service vncserver status
chkconfig iptables on


tigervnc-1.10.1-7.el6.x86_64.zip




文章最后更新时间: 2022-09-26 14:49:34