此内容没有您所选择的语言版本。

9.5. Configuring the Node Host DHCP and Host Name


The node host (Host 2) requires general network configuration. Replace eth0 in the file names with the appropriate network interface for your system in the examples that follow.

Procedure 9.4. To Configure the DHCP Client and Host Name on the Node Host:

  1. Create the /etc/dhcp/dhclient-eth0.conf file, then add the following lines to configure the DHCP client to send DNS requests to the broker (Host 1) and assume the appropriate host name and domain name. Replace 10.0.0.1 with the actual IP address of Host 1 and example.com with the actual domain name of Host 2. If you are using a network interface other than eth0, edit the configuration file for that interface instead.
    prepend domain-name-servers 10.0.0.1;
    prepend domain-search "example.com";
    Copy to Clipboard Toggle word wrap
  2. Edit the /etc/sysconfig/network file on Host 2, and set the HOSTNAME parameter to the fully-qualified domain name (FQDN) of Host 2. Replace node.example.com in the following example with the host name of Host 2.
    HOSTNAME=node.example.com
    Copy to Clipboard Toggle word wrap

    Important

    Red Hat does not recommend changing the node host name after the initial configuration. When an application is created on a node host, application data is stored in a database. If the node host name is modified, the data does not automatically change, which can cause the instance to fail. The node host name cannot be changed without deleting and recreating all gears on the node host. Therefore, verify that the host name is configured correctly before deploying any applications on a node host.
  3. Set the host name immediately:
    # hostname node.example.com
    Copy to Clipboard Toggle word wrap

    Note

    If you use the kickstart or bash script, the configure_dns_resolution and configure_hostname functions perform these steps.
  4. Run the hostname command on Host 2:
    # hostname
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat