如何在CentOS 5.2中安装vnc
2008-10-08 17:51
423 查看
如何在CentOS 5.2中安装vnc
作者:李书鹏
本文介绍VNC 4.1.2在CentOS5.2中的安装过程。
将从RealVNC官方下载的vnc-4_1_2-x86_linux.tar.gz
将其放到任意目录,如/home/xxx下。
1.解压。
执行命令
#tar -zxvf vnc-4_1_2-x86_linux.tar.gz
2.安装vnc。
依次执行命令:
#cd vnc-4_1_2-x86_linux
#./vncinstall /usr/local/bin /usr/local/man
3.创建/usr/share/X11在/usr/X11R6/lib目录的连接(*注1)。
mkdir /usr/X11R6/lib
cd /usr/X11R6/lib
ln -s /usr/share/X11 X11
4.安装完成,运行vncserver
执行命令
#vncserver
之后按提示输入连接vncserver需要的密码
最后尝试使用vnc客户端连接,注意端口应为5901。至此,安装已经完成。
*注1:vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但CentOS5.2却在/usr
/share/X11/fonts/下。因此才需要第3步的操作,建立连接,以便vncserver找到字体。否则vncserver将不能正常运行,并
在log文件中记录以下内容:
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Xvnc Free Edition 4.1.2 - built May 12 2006 17:42:24
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc
Wed Sep 24 21:09:19 2008
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
vncext: created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Fatal server error:
could not open default font 'fixed'
xsetroot: unable to open display 'localhost.localdomain:1'
vncconfig: unable to open display "localhost.localdomain:1"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
作者:李书鹏
本文介绍VNC 4.1.2在CentOS5.2中的安装过程。
将从RealVNC官方下载的vnc-4_1_2-x86_linux.tar.gz
将其放到任意目录,如/home/xxx下。
1.解压。
执行命令
#tar -zxvf vnc-4_1_2-x86_linux.tar.gz
2.安装vnc。
依次执行命令:
#cd vnc-4_1_2-x86_linux
#./vncinstall /usr/local/bin /usr/local/man
3.创建/usr/share/X11在/usr/X11R6/lib目录的连接(*注1)。
mkdir /usr/X11R6/lib
cd /usr/X11R6/lib
ln -s /usr/share/X11 X11
4.安装完成,运行vncserver
执行命令
#vncserver
之后按提示输入连接vncserver需要的密码
最后尝试使用vnc客户端连接,注意端口应为5901。至此,安装已经完成。
*注1:vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但CentOS5.2却在/usr
/share/X11/fonts/下。因此才需要第3步的操作,建立连接,以便vncserver找到字体。否则vncserver将不能正常运行,并
在log文件中记录以下内容:
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Xvnc Free Edition 4.1.2 - built May 12 2006 17:42:24
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc
Wed Sep 24 21:09:19 2008
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
vncext: created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Fatal server error:
could not open default font 'fixed'
xsetroot: unable to open display 'localhost.localdomain:1'
vncconfig: unable to open display "localhost.localdomain:1"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
相关文章推荐
- 如何在CentOS 6安装Linux,Apache,MySQL,PHP(LAMP)
- 完全指南:如何在 CentOS 7 中安装、配置和安全加固 FTP 服务
- CentOS 6.3安装和配置VNC
- VNC安装配置及连接(CentOS)
- centos 7和redhat 7的区别及如何安装
- Centos 7 安装VNC步骤
- 如何在 CentOS 7 上安装 iRedMail
- 图解安装CentOS 5.2
- CentOS 5.2 下用Yum安装Apache+PHP+MySQL环境
- 如何解决安装CentOS时遇到引导分区位于一个GPT分区方案的错误提示问题
- VM中centOS使用NAT联网安装Apache,如何在本机访问
- 如何在CentOS 5.x 中安装Windows Azure Linux Agent (WALA)
- CentOS 5.2安装nagios实现短信告警
- 详解如何在 CentOS 7 上安装和安全配置 MariaDB 10
- CentOS下如何安装netspeeder加速
- Linux/CentOS 服务安装/卸载,开机启动chkconfig命令详解|如何让MySQL、Apache开机启动?
- CentOS 如何安装git server + Gitolite 【配置不成功需要再测试2015-8-20】
- 如何解决在centos上面用yum不能安装redis
- CentOS 5.2 Linux 下安装 Intel fortran 编译器 ifort(非商业版)