centos6.5安装vnc

1.通过yum安装tigervnc包

yum install tigervnc-server -y

centos6.5安装vnc

2. 设置开机自启vncservic服务

chkconfig vncserver on


3. 编辑配置文件在最后添加一下两行,root是一个账户,1是编号,也可以添加多个账号和编号,

vim /etc/sysconfig/vncservers

centos6.5安装vnc

VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared -depth 24"

4. 设置vnc的登陆密码

vncpasswd

centos6.5安装vnc

5.启动vncservier服务,

/etc/init.d/vncserver start

centos6.5安装vnc

6.检查vnc的端口5900.没有端口

netstat -lntp

centos6.5安装vnc

7.首次启动vncserver

vncserver

centos6.5安装vnc

8.再次检查vnc的端口5900.端口已经打开了

netstat -lntp

centos6.5安装vnc

9.注意临时关闭防火墙,必须要关闭防火墙

service iptables stop


centos6.5安装vnc


10.使用机器ip:端口登陆


centos6.5安装vnc

11.ok.登陆成功了

centos6.5安装vnc

注意事项:如果提示

VNC VNC服务器与TigelvnC-Server -1.1.0~EL64.4.1.x8664 64的冲突

那么

rpm -qa |grep vnc

yum -y remove 包名

centos6.5安装vnc