始创于2000年 股票代码:831685
咨询热线:0371-60135900 注册有礼 登录
  • 挂牌上市企业
  • 60秒人工响应
  • 99.99%连通率
  • 7*24h人工
  • 故障100倍补偿
您的位置: 网站首页 > 帮助中心>文章内容

在CentOS下安装配置VNC的过程

发布时间:  2012/8/13 10:06:05
  1.检查vnc客户端和服务器是否已经安装:
 
[gavin@centos~]$rpm-qvncvnc-server
 
packagevncisnotinstalled
 
vnc-server-4.0-8.1
 
centos5已包含vnc的安装包
 
2.将用户名称加入到配置文件:
 
(注:这里的“用户名”是指linux系统用户的名称)
 
[gavin@centos~]#vi/etc/sysconfig/vncservers
 
#
 
#UncommentthelinebelowtostartaVNCserverondisplay:1
 
#asmy'myusername'(adjustthistoyourown)。Youwillalso
 
#needtosetaVNCpassword;run'manvncpasswd'toseehow
 
#todothat.
 
#
 
#DONOTRUNTHISSERVICEifyourlocalareanetworkis
 
#untrusted!ForasecurewayofusingVNC,see
 
#http://www.uk.research.att.com/vnc/sshvnc.html>.
 
#VNCSERVERS="1:myusername"
 
#VNCSERVERS="1:gavin2:john"#usethemethodformoreuser
 
VNCSERVERS="1:gavin2:root3:root"
 
#VNCSERVERARGS[1]="-geometry800x600"
 
VNCSERVERARGS[1]="-geometry1024x768"
 
3.设置用户gavin的密码
 
[gavin@centos~]$vncpasswd
 
Password:
 
Verify:
 
4.启动VNC服务
 
[gavin@centos~]#/sbin/servicevncserverstart
 
StartingVNCserver:1:gavin[OK]
 
5.输入命令
 
[gavin@centos~]$cd~/.vnc/
 
[gavin@centos.vnc]$vixstartup
 
#!/bin/sh
 
#Uncommentthefollowingtwolinesfornormaldesktop:
 
#unsetSESSION_MANAGER
 
#exec/etc/X11/xinit/xinitrc
 
[-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup
 
[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources
 
xsetroot-solidgrey
 
vncconfig-iconic&
 
#xterm-geometry80x24+10+10-ls-title"$VNCDESKTOPDesktop"&
 
gnome-session&#setstartingGNOMEdesktop
 
#startkde&#kdedesktop
 
#twm&#Textinterface
 
6.重启vncserver
 
[gavin@centos~]#/sbin/servicevncserverrestart
 
ShuttingdownVNCserver:1:gavin[OK]
 
StartingVNCserver:1:gavin[OK]
 
7.Windows登陆到VNCServer
 
(1)。从IE登录
 
直接从IE浏览器中输入如下地址:
 
http://xxx.xxx.xxx.xxx:5802
 
输入密码即可使用。
 
(2)。从VNCview登录
 
在windows上安装vncview,然后输入xxx.xxx.xxx.xxx:2,连接登录,输入密码即可。
 
备注:如果从vncview登录时,提示connectionrefused(10061),则是因为linux防火墙的问题,登录centos系统,选择System——>Preferences——>RemoteDesktop,勾选sharing中的两项,Security两项不勾,点击关闭,然后再重新用vncview登录即可。
本文出自:亿恩科技【www.enkj.com】

服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[ENKJ.COM]

  • 您可能在找
  • 亿恩北京公司:
  • 经营性ICP/ISP证:京B2-20150015
  • 亿恩郑州公司:
  • 经营性ICP/ISP/IDC证:豫B1.B2-20060070
  • 亿恩南昌公司:
  • 经营性ICP/ISP证:赣B2-20080012
  • 服务器/云主机 24小时售后服务电话:0371-60135900
  • 虚拟主机/智能建站 24小时售后服务电话:0371-60135900
  • 专注服务器托管17年
    扫扫关注-微信公众号
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 亿恩科技 版权所有  地址:郑州市高新区翠竹街1号总部企业基地亿恩大厦  法律顾问:河南亚太人律师事务所郝建锋、杜慧月律师   京公网安备41019702002023号
      0
     
     
     
     

    0371-60135900
    7*24小时客服服务热线