`
mybwu_com
  • 浏览: 192606 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

CentOS6.5下安装远程桌面服务端软件VNC Server

 
阅读更多

VNC使您可以远程访问和控制您的计算机从另一计算机或移动设备上,无论你在世界任何地方常见的使用情形,包括给同事和朋友提供桌面支持、远程管理您的服务器

将VNCServer部署到您想要控制计算机,使用VNCViewer连接到你想要控制的计算机

安装服务:

yuminstalltigervnc-server

这名称有点怪,没用过不知道的话是猜测不到的。

[root@localhost ~]# yum install tigervnc-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirrors.yun-idc.com
 * updates: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.1.0-8.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                           Arch                                     Version                                            Repository                                 Size
===============================================================================================================================================================================================
Installing:
 tigervnc-server                                   x86_64                                   1.1.0-8.el6_5                                      updates                                   1.1 M

Transaction Summary
===============================================================================================================================================================================================
Install       1 Package(s)

Total download size: 1.1 M
Installed size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
tigervnc-server-1.1.0-8.el6_5.x86_64.rpm                                                                                                                                | 1.1 MB     00:02     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : tigervnc-server-1.1.0-8.el6_5.x86_64                                                                                                                                        1/1 
  Verifying  : tigervnc-server-1.1.0-8.el6_5.x86_64                                                                                                                                        1/1 

Installed:
  tigervnc-server.x86_64 0:1.1.0-8.el6_5        
Complete!

运行并设置密码:

vncserver:1

注意:vncserver和:1之间必须有空格的。

输入密码,会生成相关的文件

[root@localhost ~]# vncserver :1

You will require a password to access your desktops.

Password:
Verify:
xauth:  creating new authority file /root/.Xauthority

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

配置用户

vim/etc/sysconfig/vncservers

最后一行加入:

VNCSERVERS="1:root"多个用户用空格分开


实用命令

usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
<Xvnc-options>...
vncserver -kill <X-display>
vncserver -list
vncserver[:n]开服务
vncserver -list看有几个在运行
vncserver -kill :n 杀掉第几个x-display
vncpasswd 修改密码

服务管理

service vncserver restart
其它用法:/etc/init.d/vncserver {start|stop|restart|try-restart|status|force-reload}
chkconfig vncserver on 加入到自启动(chkconfig --level 35 vncserver on)

客户端连接
CentOS:使用TigerVNC Viewer 连接 ip:1
Windows:使用Real VNC Viewer 连接ip:1
输入密码即可访问

错误记录及解决方案:

错误记录:
[root@localhost media]# service vncserver start
Starting VNC server: 1:root 
WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.


/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids


                                                           [FAILED]
解决方案:
yum install pixman pixman-devel libXfont


错误记录:
[root@localhost /]# vncserver :1

WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running


解决过程:


ps aux |grep -i "xorg|x11"

yum -y groupinstall "GNOME Desktop Environment"  CentOS6.5下不能用。

yum groupinstall "X Window System" "KDE (K Desktop Environment)"

rm -rf /tmp/.X11-unix


错误记录:
[root@hn opt]# vncserver :1

Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server hn.kd.ny.adsl:1
A VNC server is already running as :1
[root@hn opt]# cp /tmp/.X1-lock X1-lock.bak
[root@hn opt]# rm -rf /tmp/.X1-lock
[root@hn opt]# vncserver :1

Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server hn.kd.ny.adsl:1
A VNC server is already running as :1
[root@hn opt]# vncserver :1

Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server hn.kd.ny.adsl:1
A VNC server is already running as :1
[root@hn opt]# rm -rf /tmp/.X11-unix/X1
[root@hn opt]# vncserver :1
xauth:  creating new authority file /root/.Xauthority

WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running




正在启动 VNC 服务器:1:root 
WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

                                                           [失败]

正在启动 VNC 服务器:1:root 
WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

                                                           [失败]

执行:setup命令

没有需要的选项;


以下为2014年10月21日安装VNCServer遇到的问题及解决方法
错误记录:
[root@hn]# service vncserver restart
关闭 VNC 服务器:                                          [确定]
正在启动 VNC 服务器:1:root 
Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server hn.kd.ny.adsl:1
A VNC server is already running as :1
                                                           [失败]
[root@hn]# find -name hn.kd.my.ads1:1
[root@hn]# rm -rf /tmp/.X1-lock
[root@hn]# 
[root@hn]# 
[root@hn]# service vncserver restart
关闭 VNC 服务器:                                          [确定]
正在启动 VNC 服务器:1:root 
Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server hn.kd.ny.adsl:1
A VNC server is already running as :1
                                                           [失败]
[root@hn]# rm -rf /tmp/.X11-unix/X1
[root@hn]# service vncserver restart
关闭 VNC 服务器:                                          [确定]
正在启动 VNC 服务器:1:root 
WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

                                                           [失败]
[root@hn]# 


解决方案:
[root@hn]# init 3
[root@hn]# service vncserver restart
关闭 VNC 服务器:                                          [确定]
正在启动 VNC 服务器:1:root 
New 'hn.kd.ny.adsl:1 (root)' desktop is hn.kd.ny.adsl:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/hn.kd.ny.adsl:1.log

                                                           [确定]
[root@hn]# 

如何从官网下载VNC Server服务端安装文件

如何使用VNC Viewer连接远程CentOS服务器



分享到:
评论

相关推荐

    CentOS 6.5服务器VNC远程桌面连接出错.docx

    CentOS 6.5 服务器 VNC 远程桌面连接出错解决方案 本文档提供了 CentOS 6.5 服务器 ...本文档提供了一份详细的 CentOS 6.5 服务器 VNC 远程桌面连接出错解决方案,涵盖了从安装、配置到启动和防火墙设置的所有步骤。

    CentOs 6.5 telnet 客户端 linux 64(离线安装)

    centos 6.5 telnet 客户端 安装文件 rpm包 centos 6.5 telnet 服务端 安装文件 rpm包 http://vault.centos.org/6.5/os/x86_64/Packages/ 从官网下载亲测可以用

    CentOS6.5一键安装Mysql5.6

    本文将详细介绍如何在CentOS 6.5上进行MySQL 5.6的一键安装过程,包括必要的环境准备、安装步骤、配置优化以及安全设置。 一、环境准备 在开始安装之前,确保你的CentOS 6.5系统已经更新到最新,运行以下命令进行...

    Centos6.5 镜像文件下载

    ### Centos6.5镜像文件下载与安装详解 #### 一、CentOS 6.5简介 CentOS是Community ENTerprise Operating System的缩写,是一个基于Linux内核的操作系统,它主要提供了企业级的计算环境。CentOS 6.5作为CentOS 6...

    centos 6.5下安装文件上传下载服务

    centos 6.5下的文件上传下载服务安装和配置 centos 6.5下的文件上传下载服务是指在centos 6.5操作系统中安装和配置文件上传下载服务,以解决上传和下载文件的问题。这个服务可以让用户轻松地上传和下载文件,而不...

    linux centos6.5亲测有效 ntp服务端配置.docx

    Linux CentOS 6.5 NTP 服务端配置 本文档将指导您如何在 Linux CentOS 6.5 系统中配置 NTP 服务端,以实现时间同步。NTP(Network Time Protocol)是一种用于同步计算机时间的协议,能够确保计算机时间的准确性。 ...

    CentOS6.5离线安装openssh8.6p1软件包-步骤及依赖.rar

    在本案例中,我们有"CentOS6.5离线安装openssh8.6p1软件包-步骤及依赖.rar"这个压缩包文件,它应该包含了openssh 8.6p1以及所有必需的依赖项。在拥有互联网连接的机器上,你需要访问OpenSSH的官方网站或者通过yum...

    CentOS 6.5 安装VNC 5 详细过程

    在 CentOS 6.5 操作系统中,安装 VNC 5 可以实现远程桌面连接。 安装 VNC 5 1. 首先,下载 VNC 5 的 Linux 64 位版本( latest version RealVNC 下载),链接为 &lt;http://www.realvnc.com/download/vnc/&gt;。 2. 解...

    CentOS 6.5下安装Oracle 10g

    在CentOS 6.5环境下安装Oracle 10g是一项技术性强且需要精心准备的任务。Oracle 10g是一款广泛使用的数据库管理系统,它提供了高性能、高可用性和安全性。在CentOS 6.5上部署Oracle 10g需要满足一定的硬件和软件要求...

    centos6.5下安装ffmpeg的详细步骤

    ### CentOS 6.5 下安装 FFMPEG 的详细步骤及注意事项 #### 一、环境准备与背景介绍 FFMPEG 是一款强大的多媒体处理工具,它能够进行音视频编解码、格式转换、流媒体抓取等多种操作。对于需要处理大量音视频数据的...

    centos6.5安装教程,绝对详细,内附centos镜像等资源

    CentOS 6.5 安装教程详解 CentOS 6.5 是一个稳定、功能强大且广泛应用的 Linux 发行版,本文将详细介绍 CentOS 6.5 的安装步骤,包括虚拟机的安装、CentOS 镜像文件的下载和使用、连接工具的配置等内容。 一、...

    centos 6的vnc客户端和服务端离线安装包

    VNC(Virtual Network Computing)是一种远程桌面协议,它允许用户通过网络访问并控制另一台计算机的图形界面。在CentOS 6系统中,VNC...正确安装和配置VNC客户端和服务端,可以方便地进行远程桌面管理,提高工作效率。

    CentOS 6.5 最新可用的 Yum 源

    CentOS 6.5 的 软件源很多官方已经停止维护,该文件包内配置好的yum源是可以正常使用的。将原/etc/yum.repos.d/目录下原来的 .repo 备份, 然后把本文件包内的repo文件复制过去, yum clean all 后,再 yum ...

    centos6.5 离线安装 crontabs rpm 系统定时任务

    cronie-1.4.4-12.el6.x86_64.rpm cronie-anacron-1.4.4-12.el6.x86_64.rpm crontabs-1.10-33.el6.noarch.rpm procmail-3.22-25.1.el6.x86_64.rpm sendmail-8.14.4-8.el6.x86_64.rpm

    Centos6.5下安装oracle

    自己写的文档,经过亲自实践并截图的。centos6.5下安装11g任何版本

    oracle 11g for centos6.5静默安装

    标题中的知识点:“oracle 11g for centos6.5静默安装”说明本文是关于如何在CentOS 6.5操作系统上通过静默方式安装Oracle 11g数据库的过程。静默安装是指无需人工干预,通过预设参数或脚本实现自动安装的过程。这种...

    centos6.5下oracle 11gr2服务器端安装

    实际在机器上的操作步骤,一步一步截图下来。真是可靠

    Centos7.2 安装VNC远程桌面

    Centos7.2 安装 VNC 远程桌面 在 Centos 7.2 最小化安装后,需要安装 VNC 远程桌面以方便远程操作。下面是安装 VNC 远程桌面所需的步骤: 首先,检查是否安装 VNC。使用 rpm 命令来检查 VNC 是否已经安装。如果未...

    Centos6.5安装教程for oracle

    ### CentOS 6.5 for Oracle 的安装与配置详解 #### 一、概述 本文将详细介绍如何在服务器上安装并配置CentOS 6.5系统,特别是针对Oracle数据库环境的优化和配置方法。CentOS 6.5是一款稳定且广泛使用的Linux发行版...

Global site tag (gtag.js) - Google Analytics