您的位置:首页 > 运维架构 > Linux

CentOS6.2 中VNC 的配置

2013-03-18 16:03 267 查看
CentOS6.2 中VNC 的配置

一、安装vnc服务端:

#yum -y groupinstall "Chinese Support"

#yum groupinstall "X Window System" "Desktop"

#yum install vnc-server tigervnc-server tigervnc

、启动vnc服务:

# vncserver

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/xen:1.log

会在当前用户主目录下 生成 .vnc 目录和配置文件

设置密码

# vncpasswd

Password:

Verify:

设置的密码保存在 /root/.vnc/passwd

添加启动项

# chkconfig --add vncserver

# chkconfig vncserver on

# chkconfig --list vncserver

vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off

表示VNC已经安装好了

三、配置防火墙,允许 VNC 连接

vi /etc/sysconfig/iptables

添加

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5910 -j ACCEPT

vi /etc/selinux/config

SELINUX=disabled

chkconfig --lever 0123456 iptables off

chkconfig --lever 0123456 ip6tables off

重启防火墙

/sbin/service iptables restart

四、配置登录帐号、桌面分辨率、连接方式输入:

vi /etc/sysconfig/vncservers

VNCSERVERS="2:root"

VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"

五:修改远程桌面显示配置文件:

# vi /root/.vnc/xstartup:

#twm &

sed -i 's/twm/gnome-session/g' /root/.vnc/xstartup

六、重启vnc

vncserver

New 'centos62:3 (root)' desktop is centos62:3

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/centos62:3.log

七、vnc客户端

下载并运行KvmManager.exe

在登陆框中输入:服务器端IP:3(桌面号)

ok
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: