CentOS6部署VNC服務端,centos6vnc服務端

來源:互聯網
上載者:User

CentOS6部署VNC服務端,centos6vnc服務端

    VNC (Virtual Network Computer)是虛擬網路電腦的縮寫。VNC 是在基於 UNIX 和 Linux 作業系統的免費的開源軟體,遠端控制能力強大,高效實用,其效能可以和 Windows 和 MAC 中的任何遠端控制軟體媲美。

    在 Linux 中,VNC 包括以下四個命令:vncserver,vncviewer,vncpasswd,vncconnect。

    下面以CentOS6.2為例,安裝VNC步驟如下:

    一、安裝gnome案頭環境

    如果系統已經安裝了gnome案頭環境,此步省略。

123456789 # 安裝fontforge,避免字型出現方框亂碼yum install fontforge -y# 安裝gnome案頭環境yum groupinstall Desktop -y# 安裝中文語言支援包yum groupinstall 'Chinese Support' -y# 設定系統預設語言為中文sed -i '/LANG/c\LANG="zh_CN.UTF-8"' /etc/sysconfig/i18nsource /etc/sysconfig/i18n

    二、部署vnc server

1234567891011 # 安裝vnc軟體包yum install tigervnc tigervnc-server -y# 設定vncserver開機啟動chkconfig vncserver on# 設定vnc登入密碼,密碼儲存在~/.vnc/passwd# 如果修改普通使用者的vnc密碼,要先su切換到此使用者下vncpasswd# 查看vncserver設定檔rpm -qc tigervnc-server# 配置vncservervim /etc/sysconfig/vncservers
12345 # 以使用者root啟動第一個和第二個案頭VNCSERVERS="1:root 2:root"# 調整解析度VNCSERVERARGS[1]="-geometry 1024x768"VNCSERVERARGS[2]="-geometry 1024x768"
12345678910111213 # 啟動vncserver,下面啟動了兩個案頭vncserver :1vncserver :2# 修改xstartup檔案,把最後的twm &改為gnome-session &# 此檔案只有在vncserver啟動之後,才會出現,修改後重啟vncservervim ~/.vnc/xstartup# 停止vncservervncserver -kill :1vncserver -kill :2# 配置防火牆iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPTiptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPTservice iptables save

    至此服務端部署完畢,你可以通過UltraVNC Viewer、TigerVNC Viewer或者RealVNC Viewer訪問遠端桌面了。

    下面介紹下常用操作:

12345678 # 大量啟動service vncserver start# 大量重啟service vncserver restart# 大量停止service vncserver stop# 查看啟動並執行案頭vncserver -list

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.