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