部署VNCServer及VNCServer的高级应用_第1页
部署VNCServer及VNCServer的高级应用_第2页
部署VNCServer及VNCServer的高级应用_第3页
部署VNCServer及VNCServer的高级应用_第4页
部署VNCServer及VNCServer的高级应用_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 安装VNC服务端view sourceprint?1.rootrhel6 # rpm -q tigervnc-server 2.tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 启动VNC服务view sourceprint?01.rootrhel6 # vncserver #第一次启动display :1(第一张虚拟纸,依次类推),可通过vncserver :2 启动display:2 02.03.New :1 (root) desktop is :1 04.05.Start

2、ing applications specified in /root/.vnc/xstartup 06.Log file is /root/.vnc/:1.log 07.08.rootrhel6 # /etc/init.d/vncserver status 09.Xvnc (pid 2182) is running. 修改VNC Server配置文件view sourceprint?01.rootrhel6 # cat /etc/sysconfig/vncservers #启动vncserver后才生成 02.# The VNCSERVERS variable i

3、s a list of display:user pairs. 03.# 04.# Uncomment the lines below to start a VNC server on display :2 05.# as my myusername (adjust this to your own). You will also 06.# need to set a VNC password; run man vncpasswd to see how 07.# to do that. 08.# 09.# DO NOT RUN THIS SERVICE if your local area n

4、etwork is 10.# untrusted! For a secure way of using VNC, see this URL: 11.# 12.13.# Use -nolisten tcp to prevent X connections to your VNC server via TCP. 14.15.# Use -localhost to prevent remote VNC clients connecting except when 16.# doing so through a secure tunnel. See the -via option in the 17.

5、# man vncviewer manual page. 18.19.# VNCSERVERS=2:myusername 20.# VNCSERVERARGS2=-geometry 800x600 -nolisten tcp -nohttpd -localhost 21.VNCSERVERS=2:xfcy 3:root #设置在vncserver启动2个display,且display:2,:3的用户权限分别为xfcy,root 22.VNCSERVERARGS2=-geometry 800x60023.VNCSERVERARGS3=-geometry 800x600 -localhost #

6、设置display:2的分辨率为800600且只监听本地 设置VNC密码(保存在/.vnc/passwd中),同时自动生成/.vnc/xstartup(在每次启动VNC服务时候,都会读取该文件中的配置信息)view sourceprint?1.rootrhel6 # vncpasswd 2.Password: 3.Verify: 修改xstartup配置文件view sourceprint?01.rootrhel6 # cat /.vnc/xstartup 02.#!/bin/sh 03.04. -r /etc/sysconfig/i18n & . /etc/sysconfig/i18n 05

7、.export LANG 06.export SYSFONT 07.vncconfig -iconic & 08.unset SESSION_MANAGER 09.unset DBUS_SESSION_BUS_ADDRESS 10.OS=uname -s 11.if $OS = Linux ; then12.case $WINDOWMANAGER in13.*gnome*) 14.if -e /etc/SuSE-release ; then15.PATH=$PATH:/opt/gnome/bin 16.export PATH 17.fi18.; 19.esac 20.fi21.if -x /e

8、tc/X11/xinit/xinitrc ; then22.exec /etc/X11/xinit/xinitrc 23.fi24.if -f /etc/X11/xinit/xinitrc ; then25.exec sh /etc/X11/xinit/xinitrc 26.fi27. -r $HOME/.Xresources & xrdb $HOME/.Xresources 28.xsetroot -solid grey 29.#xterm -geometry 80x24+10+10 -ls -title $VNCDESKTOP Desktop & #注释掉这两行避免出现黑屏 30.#twm

9、 & 31.32.gnome-session & #登录到GNOME桌面环境 33.#startkde & #登录到KDE桌面环境 配置Display:2(即用户权限为xfcy的共享桌面,配置方法同上)view sourceprint?01.rootrhel6 .vnc# su - xfcy #必须在对应的用户下设置密码 02.xfcyrhel6 $ vncserver :2 03.04.You will require a password to access your desktops. 05.06.Password: 07.Verify: 08.09.New

10、:2 (xfcy) desktop is :2 10.11.Creating default startup script /home/xfcy/.vnc/xstartup 12.Starting applications specified in /home/xfcy/.vnc/xstartup 13.Log file is /home/xfcy/.vnc/:2.log14.15.xfcyrhel6 $ vi .vnc/xstartup 16.#!/bin/sh 17.18. -r /etc/sysconfig/i18n & . /et

11、c/sysconfig/i18n 19.export LANG 20.export SYSFONT 21.vncconfig -iconic & 22.unset SESSION_MANAGER 23.unset DBUS_SESSION_BUS_ADDRESS 24.OS=uname -s 25.if $OS = Linux ; then 26.case $WINDOWMANAGER in 27.*gnome*) 28.if -e /etc/SuSE-release ; then 29.PATH=$PATH:/opt/gnome/bin 30.export PATH 31.fi 32.; 3

12、3.esac 34.fi 35.if -x /etc/X11/xinit/xinitrc ; then 36.exec /etc/X11/xinit/xinitrc 37.fi 38.if -f /etc/X11/xinit/xinitrc ; then 39.exec sh /etc/X11/xinit/xinitrc 40.fi 41. -r $HOME/.Xresources & xrdb $HOME/.Xresources 42.xsetroot -solid grey 43.#xterm -geometry 80x24+10+10 -ls -title $VNCDESKTOP Des

13、ktop & 44.#twm & 45.46.gnome-session & 重启VNC Server服务view sourceprint?01.rootrhel6 # /etc/init.d/vncserver restart 02.Shutting down VNC server: 2:xfcy 3:root OK 03.Starting VNC server: 2:xfcy 04.New :2 (xfcy) desktop is :2 05.06.Starting applications specified in /home/xf

14、cy/.vnc/xstartup 07.Log file is /home/xfcy/.vnc/:2.log 08.09.3:root 10.New :3 (root) desktop is :3 11.12.Starting applications specified in /root/.vnc/xstartup 13.Log file is /root/.vnc/:3.log 14.15. OK 16.17.rootrhel6 .vnc# netstat -lntp | gre

15、p 590 #VNC server监听的端口从5900开始,display :1的监听5901,display :2监听5902,以此类推18.19.tcp 0 0 :5902 :* LISTEN 3567/Xvnc 20.tcp 0 0 :5903 :* LISTEN 3649/Xvnc 客户端访问view sourceprint?01.rootrhel5 # vncviewer 19:3 02.03.VNC Viewer Free Edition 4.1.2 for X - built Jan 26 2009

16、 11:52:08 04.Copyright (C) 2002-2005 RealVNC Ltd. 05.See for information on VNC. 06.07.Sun Nov 18 23:17:16 2012 08.CConn: connected to host 19 port 5903 09.CConnection: Server supports RFB protocol version 3.8 10.CConnection: Using RFB protocol version 3.8 11.12.Sun Nov 18 23:17:18 2012 1

17、3.TXImage: Using default colormap and visual, TrueColor, depth 16. 14.CConn: Using pixel format depth 6 (8bpp) rgb222 15.CConn: Using ZRLE encoding 16.17.Sun Nov 18 23:17:21 2012 18.CConn: Throughput 20476 kbit/s - changing to hextile encoding 19.CConn: Throughput 20476 kbit/s - changing to full col

18、our 20.CConn: Using pixel format depth 16 (16bpp) little-endian rgb565 21.CConn: Using hextile encoding 通过SSH加密VNC的远程连接view sourceprint?01.rootrhel5 # vncviewer -via 19 :2 02.03.VNC Viewer Free Edition 4.1.2 for X - built Jan 26 2009 11:52:08 04.Copyright (C) 2002-2005 RealVNC Ltd. 05.See

19、 for information on VNC. 06.The authenticity of host rhel6 (19) cant be established. 07.RSA key fingerprint is 1a:cf:92:de:28:7d:f2:e0:e8:e6:ad:f1:7c:40:6a:67. 08.Are you sure you want to continue connecting (yes/no)? yes09.Warning: Permanently added rhel6 (RSA) to the list of known hosts

20、. 10.rootrhel6s password: 11.12.Tue Nov 20 01:12:37 2012 13.CConn: connected to host localhost port 5599 14.CConnection: Server supports RFB protocol version 3.8 15.CConnection: Using RFB protocol version 3.8 16.17.Tue Nov 20 01:12:39 2012 18.TXImage: Using default colormap and visual, TrueColor, de

21、pth 16. 19.CConn: Using pixel format depth 6 (8bpp) rgb222 20.CConn: Using ZRLE encoding 21.22.Tue Nov 20 01:12:41 2012 23.CConn: Throughput 20588 kbit/s - changing to hextile encoding 24.CConn: Throughput 20588 kbit/s - changing to full colour 25.CConn: Using pixel format depth 16 (16bpp) little-en

22、dian rgb565 26.CConn: Using hextile encoding 关闭已启用的display:2view sourceprint?1.xfcyrhel6 $ vncserver -kill :2 #必须以相应的用户进行操作 2.Killing Xvnc process ID 3567 3.Xvnc seems to be deadlocked. Kill the process manually and then re-run 4./usr/bin/vncserver -kill :2 5.to clean up the socket files. 6.7.rootrh

23、el6 # netstat -lntp | grep 590 8.tcp 0 0 :5903 :* LISTEN 6585/Xvnc 通过VNC Server自动抓取客户端的桌面(CatchDesktop)附:AIX上部署VNC Serverview sourceprint?01.一.安装VNC 02.# rpm -ivh vnc-3.3.3r2-6.aix5.1.ppc.rpm 03.vnc # 04.05.# rpm -ql vnc 06./opt/freeware/bin/Xvnc 07./opt/freeware/bin/vncconnect 08./o

24、pt/freeware/bin/vncpasswd 09./opt/freeware/bin/vncserver 10./opt/freeware/bin/vncviewer 11./opt/freeware/doc/vnc-3.3.3r2 12./opt/freeware/doc/vnc-3.3.3r2/LICENCE.TXT 13./opt/freeware/doc/vnc-3.3.3r2/README 14./opt/freeware/share/vnc/classes 15./opt/freeware/share/vnc/classes/DesCipher.class 16./opt/

25、freeware/share/vnc/classes/animatedMemoryImageSource.class 17./opt/freeware/share/vnc/classes/authenticationPanel.class 18./opt/freeware/share/vnc/classes/clipboardFrame.class 19./opt/freeware/share/vnc/classes/index.vnc 20./opt/freeware/share/vnc/classes/optionsFrame.class 21./opt/freeware/share/vn

26、c/classes/rfbProto.class 22./opt/freeware/share/vnc/classes/shared.vnc 23./opt/freeware/share/vnc/classes/vncCanvas.class 24./opt/freeware/share/vnc/classes/vncviewer.class 25./opt/freeware/share/vnc/classes/vncviewer.jar 26./opt/freeware/vnc 27./usr/lpp/X11/bin/Xvnc 28./usr/lpp/X11/bin/vncconnect 2

27、9./usr/lpp/X11/bin/vncpasswd 30./usr/lpp/X11/bin/vncserver 31./usr/lpp/X11/bin/vncviewer 32.33.34.二.编辑配置文件:/opt/freeware/bin/vncserver 35.1.修改前: 36.# $cmd .= -fp /usr/lib/X11/fonts/,/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/; 37.修改后:(去掉注释,即加入了fonts) 38.$cmd .= -fp /usr/lib/X11/fonts/,/usr/li

28、b/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/; 39.$cmd .= -ac -fp /usr/lib/X11/fonts/,/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/; (若出现灰屏则设置为此) 40.2.修改前: 41.$vncClasses = /usr/local/vnc/classes; 42.修改后: 43.$vncClasses = /opt/freeware/vnc/classes; 44.45.# cat /opt/freeware/bin/vncserver | egrep font|vncClasses | grep -v # 46.$vncClasses = /opt/freeware/vnc/classes; 47.$cmd .= -fp /usr/l

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论