Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

如何在 RedHat Enterprise Linux (RHEL) 6 上安裝和設定 VNC 伺服器

Summary: 本文提供如何在 RedHat Enterprise Linux (RHEL) 6 上安裝和設定 VNC 伺服器的相關資訊

This article may have been automatically translated. If you have any feedback regarding its quality, please let us know using the form at the bottom of this page.

Article Content


Symptoms

Cause

1.安裝軟體

  • 請確定您已以「root」身分登入
  • 如果您有 RHN 或衛星伺服器的連線能力:
    • # yum install tigervnc-server
  • 如果您沒有 RHN 或衛星伺服器的連線能力:
  • 建立本機「yum」儲存庫

 


 

2.為使用者設定 VNC 密碼

  • 將使用者切換至想要用於 VNC 的使用者:
    • # su - vncuser1
注意:將「vncuser1」更換為正確的使用者名稱
  • 設定使用者的 VNC 密碼:
    • $ vncpasswd
    • $ exit
  • 視需要為每個 VNC 使用者重複上述步驟

 


 

3.為使用者設定解決方案

  • 使用您最愛的編輯器編輯「/etc/sysconfig/vncservers
  • 附加下列各行:
    • VNCSERVERS="1:vncuser1 2:vncuser2"
    • VNCSERVERARGS[1]="-geometry 1024x768"
    • VNCSERVERARGS[2]="-geometry 1024x768"
注意:將「vncuser1」和「vncuser2」更換為正確的使用者名稱。您可以視需要新增更多使用者。此外,您可以視需要變更解決方案。

 


 

4.啟動 VNC 伺服器

  • 啟動服務:
    • # service vncserver start
  • 確定重新開機時已啟動服務:
    • # chkconfig vncserver on

 


 

5.設定防火牆

  • # iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j ACCEPT
  • # iptables -I INPUT -m state --state NEW -p tcp --destination-port 5902 -j ACCEPT
注意:每個使用者都需要開啟從 5901 開始的額外防火牆連接埠。由於我們在上面新增了兩個使用者,因此我們需要開啟兩個連接埠。
  • # service iptables save

 

回到頁首


Resolution

-

Article Properties


Affected Product

Servers, PowerEdge

Last Published Date

30 Sep 2021

Version

5

Article Type

Solution