admin管理员组

文章数量:1533106

2024年7月9日发(作者:)

VNC(tigervnc)的安装

1.查询是否安装vnc了.

[root@rhel ~]# rpm -qa | grep vnc

2.挂载系统光盘,准备安装。

[root@rhel ~]# mount /dev/cdrom /mnt/

mount: block device /dev/sr0 is write-protected, mounting read-only

3.显示安装目录中有多少以tinger开头的文件。

[root@rhel ~]# rpm –qa | grep /mnt/Packages/tigervnc*

[root@rhel ~]# rpm -ivh /mnt/Packages/tigervnc-

4.安装tigervnc的这两个文件。

[root@rhel ~]# rpm -ivh /mnt/Packages/

warning: /mnt/Packages/: Header V3 RSA/SHA256 Signature, key ID

fd431d51: NOKEY

########################################### [100%]

1:tigervnc ########################################### [100%]

[root@rhel ~]# rpm -ivh /mnt/Packages/

warning: /mnt/Packages/: Header V3 RSA/SHA256 Signature,

key ID fd431d51: NOKEY

########################################### [100%]

1:tigervnc-server ########################################### [100%]

5.再次查看是否有vnc程序文件

[root@rhel ~]# rpm -qa | grep vnc

6.i686

6.i686

6.修改VNC的主配置文件。

[root@rhel ~]# vi /etc/sysconfig/vncservers

在主配置文件最后添加如下的一条。

VNCSERVERs="1:zhangsan"

7.设置vnc连接时所使用的账户密码。

[root@rhel ~]# su – zhangsan

这里的账户一定要切换到zhangsan后在vncpasswd,否则无效。

[zhangsan@rhel ~]$ vncpasswd

Password:

Verify:

[zhangsan@rhel ~]$ su

密码:

启动vncserver服务

[root@rhel zhangsan]# service vncserver start

8.客户端的连接:

a.首先关闭防火墙和SElinux

[root@rhel zhangsan]# iptables -F

[root@rhel zhangsan]# setenforce 0

b.看看所vnc所应用的端口

[root@rhel zhangsan]# netstat -anptu | grep vnc

tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN

13039/Xvnc

tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN

13039/Xvnc

tcp 0 0 :::6001 :::* LISTEN

13039/Xvnc

c.客户的连接

其一的连接方法为:

其二的连接方法为:

注:上面的windows下的vncclient工具,也可以使用linux里安装的“tigerVNC Viewer”工

具。如果想多人共享一个桌面,这个时候,”Options”中选择”shared connection”即可。

本文标签: 连接安装使用是否