1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > CentOS6.5下安装远程桌面服务端软件VNC Server

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

时间:2018-10-13 20:44:39

相关推荐

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

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

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

安装服务:

yuminstalltigervnc-server

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

[root@localhost ~]# yum install tigervnc-serverLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile* base: mirror.* extras: mirrors.yun-* updates: mirrors.yun-Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package tigervnc-server.x86_64 0:1.1.0-8.el6_5 will be installed--> Finished Dependency ResolutionDependencies Resolved===============================================================================================================================================================================================Package Arch Version Repository Size===============================================================================================================================================================================================Installing:tigervnc-serverx86_641.1.0-8.el6_5 updates1.1 MTransaction Summary===============================================================================================================================================================================================Install 1 Package(s)Total download size: 1.1 MInstalled size: 2.9 MIs this ok [y/N]: yDownloading Packages:tigervnc-server-1.1.0-8.el6_5.x86_64.rpm | 1.1 MB00:02Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionInstalling : tigervnc-server-1.1.0-8.el6_5.x86_641/1 Verifying : tigervnc-server-1.1.0-8.el6_5.x86_641/1 Installed:tigervnc-server.x86_64 0:1.1.0-8.el6_5 Complete!

运行并设置密码:

vncserver:1

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

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

[root@localhost ~]# vncserver :1You will require a password to access your desktops.Password:Verify:xauth: creating new authority file /root/.XauthorityNew 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog 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 startStarting VNC server: 1:root WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. Attempting to determine an appropriatefont 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 :1WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc._XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal 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 :1Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X1-lockRemove this file if there is no X server hn.kd.ny.adsl:1A 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 :1Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X11-unix/X1Remove this file if there is no X server hn.kd.ny.adsl:1A VNC server is already running as :1[root@hn opt]# vncserver :1Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X11-unix/X1Remove this file if there is no X server hn.kd.ny.adsl:1A VNC server is already running as :1[root@hn opt]# rm -rf /tmp/.X11-unix/X1[root@hn opt]# vncserver :1xauth: creating new authority file /root/.XauthorityWARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc._XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal 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 fontcatalog is not properly configured. Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc._XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal 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 fontcatalog is not properly configured. Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc._XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running[失败]执行:setup命令没有需要的选项;以下为10月21日安装VNCServer遇到的问题及解决方法错误记录:[root@hn]# service vncserver restart关闭 VNC 服务器: [确定]正在启动 VNC 服务器:1:root Warning: hn.kd.ny.adsl:1 is taken because of /tmp/.X1-lockRemove this file if there is no X server hn.kd.ny.adsl:1A 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/X1Remove this file if there is no X server hn.kd.ny.adsl:1A 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 fontcatalog is not properly configured. Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc._XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error:Cannot establish any listening sockets - Make sure an X server isn't already running_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal 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:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/hn.kd.ny.adsl:1.log[确定][root@hn]#

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

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。