CentOS6.5下安裝遠端桌面服務端軟體VNC Server,centos6.5vnc

來源:互聯網
上載者:User

CentOS6.5下安裝遠端桌面服務端軟體VNC Server,centos6.5vnc

VNC 使您可以遠端存取和控制您的電腦從另一電腦或行動裝置上,無論你在世界的任何地方。常見的使用情形,包括給同事和朋友提供案頭支援、遠端管理您的伺服器。

將 VNC Server部署到您想要控制電腦,使用VNC Viewer串連到你想要控制的電腦。

安裝服務:

yum install tigervnc-server

這名稱有點怪,沒用過不知道的話是猜測不到的。

[root@localhost ~]# yum install tigervnc-serverLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.comSetting 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-server                                   x86_64                                   1.1.0-8.el6_5                                      updates                                   1.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 MB     00:02     Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning 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 :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 命令沒有需要的選項;以下為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-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伺服器


CentOS 下設定遠端桌面喜好設定與開啟VNC Server有什不同?

其實是同一種方式,
開啟遠端桌面喜好設定用的是預設的0號連接埠。
你可以輸入IP地址:0測試下。
 
windows怎通過vnc遠端連線到linux系統案頭

1 安裝圖形介面:
1) 安裝登入管理器:$sudo apt-get install gdm
2) 安裝案頭環境,僅安裝最基本的組件:$sudo apt-get install gnome-core (安裝完之後可以用startx命令啟動圖形介面)
3) 安裝圖形介面(自動安裝應用程式):$sudo apt-get install ubuntu-desktop (安裝完成後重啟一下系統)

2 在ubuntu下安裝vnc server(VNC服務端):
$sudo apt-get install vnc4server

3 啟動VNC服務:$vncserver :1 (數字1 表示案頭號)
要實現多少同時串連ubuntu server ,用如下命令:$vncserver -geometry 1280×800 -alwaysshared :1 (-geometry 1280×800表示分辯率,-alwaysshared表示運行多個人同時串連到同一個案頭)

停止VNC服務:$vncserver -kill :1

4 在ubuntuc server 圖形介面中設定允許完程登陸:
系統(System) —> 喜好設定(Preferences) —> 遠端桌面(Remote Desktop),進行如下設定:

設定好密碼好,在windows用戶端應可以通過vnc viewer遠端連線ubuntu server 了!
 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.