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

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

将 VNC Server部署到您想要控制计算机,使用VNC Viewer连接到你想要控制的计算机。

安装服务:

yum install tigervnc-server

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

[[email protected] ~]# 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之间必须有空格的。

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

[[email protected] ~]# 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
输入密码即可访问

错误记录及解决方案:

错误记录:
[[email protected] 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

错误记录:
[[email protected] /]# 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

错误记录:
[[email protected] 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
[[email protected] opt]# cp /tmp/.X1-lock X1-lock.bak
[[email protected] opt]# rm -rf /tmp/.X1-lock
[[email protected] 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
[[email protected] 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
[[email protected] opt]# rm -rf /tmp/.X11-unix/X1
[[email protected] 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遇到的问题及解决方法
错误记录:
[[email protected]]# 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
                                                           [失败]
[[email protected]]# find -name hn.kd.my.ads1:1
[[email protected]]# rm -rf /tmp/.X1-lock
[[email protected]]#
[[email protected]]#
[[email protected]]# 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
                                                           [失败]
[[email protected]]# rm -rf /tmp/.X11-unix/X1
[[email protected]]# 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

                                                           [失败]
[[email protected]]# 

解决方案:
[[email protected]]# init 3
[[email protected]]# 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

                                                           [确定]
[[email protected]]# 

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

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

时间: 2024-10-10 15:04:30

CentOS6.5下安装远程桌面服务端软件VNC Server的相关文章

启用Win8(中文版/核心版)中被阉割的远程桌面服务端

Windows 8/8.1 标准版(中文版/核心版)中取消了远程桌面服务端,想通过远程连接到自己的电脑就很麻烦了,第三方远程桌面速度又不理想(如TeamViewer).通过以下方法可让系统恢复远程桌面功能.国内多数品牌机都是预装的win8中文版 一.傻瓜式: 下载安装一个自动化工具即可,不需要懂太多专业知识.下载地址:https://github.com/binarymaster/rdpwrap/releases 压缩包中有一个启用远程桌面的工具,和一个配置工具(因为系统属性中没有配置界面,所属

linux(centos 6.4)下安装php memcache服务端及其客户端(详细教程)

前言 在搭建个人博客时,由于没有使用任何框架,纯手工code前台和后台,导致遇到许多问题,其中一个问题就是mysql连接导致的页面相应速度异常低.在查询各种途径后,只能考虑使用memcache缓存.在参考了许多文章后,终于成功的在centos6.4下安装memcache.由于发现在安装过程中,许多文章在有些细节没有解释清楚,导致我一直卡在一个问题上面.为了帮助其他可能和我遇到了同样问题的娃们,我准备也把我的安装过程详细介绍下,而不是ctrl+c,ctrl+v.希望对大家有帮助.(部分参考www.

[转载] linux、Solaris下xdmcp远程桌面服务

原文链接 http://youlvconglin.blog.163.com/blog/static/52320420106243857254/ 使用图形界面远程登录linux和Solaris,首先要在服务端开启xdmcp服务,windows下使用xmanager连接 Ubuntu下则使用下默认也安装了该客户端,一次打开[应用程序]-[internet]-[终端服务客户端(Terminal Server Client)]或者在命令行输入tsclient,在常规标签中的协议选项可以看到XDMCP,只

在CentOS6.x下安装Compiz——桌面立方体,特效种种

参考:安装教程:http://www.2cto.com/os/201209/152493.html 快捷键:http://www.jb51.net/os/RedHat/1318.html 很多人貌似认为compiz必须要emerland,但事实上,没这个必要. compiz+gnome,实用,而又华丽,是个不错的选择. compiz需要显卡驱动,一般情况下不成问题(别忘了这是很新的cent),如果你真有问题,自行找其他教程解决,本教程假设你的显卡被默认支持. 如果你没有安装rpmfusion的源

远程桌面服务

工作任务描述 在上一个项目中,HT公司为HW的部署windows server 2008 以后,管理员总是发现服务器出现问题,但是由于HT公司的服务器不在本地,要求HT公司的管理员利用远程管理的方法管理服务器. 项目要求: 1.  在服务器上建立了一个普通用户mike: 2.  在客户机上利用mike用户远程登陆到服务器上,并将本地计算机上的硬盘驱动器在远程服务器中显示: 3.  在服务器上安装远程桌面服务和远程桌面网页连接服务: 4.  在客户机上用mike用户利用网页登陆远程桌面: 在服务器

win server 2019 :【2个?远程管理用户(单会话?)】升级为远程桌面服务【多用户(多会话)】

方法: 安装“远程桌面服务”,可以只选择“远程桌面会话主机”组件.重启计算机. 或,删除“[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod]”注册表项.重启计算机. 在组策略里,依次进入:计算机配置->管理模板->windows 组件->远程桌面服务->远程桌面会话主机->连接,将配置项“将远程桌面服务用户限制到单独的远程桌面服务会话” 为“已禁用” ,可以

在基于阿里云服务器CentOS6.5下安装Subversion 1.6.5服务

最近阿里云搞了个1元免费提供云服务器的活动,偶心痒痒就申请了一个. 正好可以作为团队的SVN服务器了,下面就来部署SVN服务吧. 一.安装基础环境 apr-1.5.0.tar.gz apr-util-1.5.3.tar.gz pcre-8.35.tar.gz zlib-1.2.8.tar.gz subversion-1.5.6.tar.gz tar -xzvf apr-1.5.0.tar.gz cd apr-1.5.0 ./configure --prefix=/usr/local/apr ma

Windows Server 2008 R2远程桌面服务安装配置和授权激活

1.安装 2.远程桌面授权激活 2.1 管理工具——远程桌面服务——(远程桌面授权管理)RD授权管理器: 2.2 由于RD授权服务器还未激活,所以授权服务器图标右下角显示红色×号: 点服务器展开——右击授权服务器——激活服务器 可选信息无需输入,直接下一步 默认已经勾选“立即启动许可证安装向导”,直接下一步 许可证计划选择“企业协议”,下一步 输入协议号码:6565792,下一步 产品版本:“Windows Server 2008或Windows Server 2008 R2” 许可证类型:“T

Linux下的远程桌面——VncServer

 在windows中为了方便统一的管理服务器,我们最常用的办法就是通过远程桌面,这样不仅方便了许多,还节约了成本.windows下可以远程桌面,那linux下可不可以远程桌面呢,答案是肯定的.下面将给大家介绍,如何搭建远程桌面服务. 我的生产环境如下: 1.联想G460笔记本电脑(windows 7       192.168.1.10) 2.DELL720服务器(RedHatEntLinux 6.6    192.168.1.2) 3.cisco 3750交换机 操作步骤: 1.安装vncse