频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

在CentOS下安装配置VNC的过程

来源: 作者:佚名 出处:巧巧读书 2008-03-05 进入讨论组

  1. 检查vnc客户端和服务器是否已经安装:
 
  [gavin@centos ~]$ rpm -q vnc vnc-server
 
  package vnc is not installed
 
  vnc-server-4.0-8.1
 
  cent os 5已包含vnc的安装包
 
  2. 将用户名称加入到配置文件
 
  (注:这里的“用户名”是指linux系统用户的名称)
 
  [gavin@centos ~]# vi /etc/sysconfig/vncservers
 
  #
 
  # Uncomment the line below to start a VNC server on display :1
 
  # as my 'myusername' (adjust this to your own)。 You will also
 
  # need to set a VNC password; run 'man vncpasswd' to see how
 
  # to do that.
 
  #
 
  # DO NOT RUN THIS SERVICE if your local area network is
 
  # untrusted! For a secure way of using VNC, see
 
  # http://www.uk.research.att.com/vnc/sshvnc.html>.
 
  # VNCSERVERS="1:myusername"
 
  # VNCSERVERS="1:gavin 2:john" # use the method for more user
 
  VNCSERVERS="1:gavin 2:root 3:root"
 
  # VNCSERVERARGS[1]="-geometry 800x600"
 
  VNCSERVERARGS[1]="-geometry 1024x768"
 
  3. 设置用户gavin的密码
 
  [gavin@centos ~]$ vncpasswd
 
  Password:
 
  Verify:
 
  4. 启动VNC服务
 
  [gavin@centos ~]# /sbin/service vncserver start
 
  Starting VNC server: 1:gavin             [ OK ]
 
  5. 输入命令
 
  [gavin@centos ~]$ cd ~/.vnc/
 
  [gavin@centos .vnc]$ vi xstartup
 
  #!/bin/sh
 
  # Uncomment the following two lines for normal desktop:
 
  #unset SESSION_MANAGER
 
  #exec /etc/X11/xinit/xinitrc
 
  [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
 
  [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
 
  xsetroot -solid grey
 
  vncconfig -iconic &
 
  #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
 
  gnome-session & #set starting GNOME desktop
 
  #startkde & #kde desktop
 
  #twm & #Text interface
 
  6. 重启vncserver
 
  [gavin@centos ~]# /sbin/service vncserver restart
 
  Shutting down VNC server: 1:gavin [ OK ]
 
  Starting VNC server: 1:gavin             [ OK ]
 
  7. Windows登陆到VNC Server
 
  (1)。从IE登录
 
  直接从IE浏览器中输入如下地址:
 
  http://xxx.xxx.xxx.xxx:5802
 
  输入密码即可使用。
 
  (2)。从VNC view登录
 
  在windows上安装vnc view,然后输入xxx.xxx.xxx.xxx:2,连接登录,输入密码即可。
 
  备注:如果从vnc view登录时,提示connection refused(10061),则是因为linux防火墙的问题,登录centos系统,选择System——>Preferences——>Remote Desktop,勾选sharing中的两项,Security两项不勾,点击关闭,然后再重新用vnc view登录即可。本U R L:http://www.qqread.com/network/server/e399927.html 更多文章 更多内容请看Windows操作系统安装电脑配置手册服务器配置专栏专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章