1. 首先yum install tigervnc-server查看是否安装VNC服务                      

 

1,启动VNCSERVER,第一次启动VNCSERVER会提示输入密码,这里分为管理员账户及普通账户,启动方式

略有所不同。

管理员:

[root@localhost /]# vncserver

You will require a password to access your desktops.

Password: 123456            #输入vnc 连接密码

Verify: 123456                 #确认vnc密码

xauth: creating new authority file /root/.Xauthority

New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup 
Starting applications specified in /root/.vnc/xstartup 
Log file is /root/.vnc/localhost.localdomain:1.log


普通用户:

[root@localhost /]#su ceboy    #ceboy 是用户名 
[ceboy@localhost /]$ vncserver

You will require a password to access your desktops.

Password: 123456            #输入vnc 连接密码

Verify: 123456                 #确认vnc密码

xauth: creating new authority file /home/ceboy/.Xauthority

New ‘localhost.localdomain:2 (ceboy)’ desktop is localhost.localdomain:2

Creating default startup script /home/ceboy/.vnc/xstartup 
Starting applications specified in /home/ceboy/.vnc/xstartup 
Log file is /home/ceboy/.vnc/localhost.localdomain:2.log

2.执行 vncpasswd命令设置root用户的vnc口令,如果是要允许其他用户登录,需要su 切换用户后在执行 。
3.修改配置文件/etc/sysconfig/vncservers
添加一行
VNCSERVERS="1:root"
保存退出
4.执行service vncserver start启动服务
5.想要系统下次启动是运行vncserver
执行chkconfig vncserver on
就可以了
 

 

 

redhat 6    vnc_职场

 

要注意一点,如果配置完后怎么也连不上,请检查你的防火墙,可以把防火墙关了再试验,不行的话找我