Chapter 6. Appendix: Using Custom Hostnames

Use the following instructions to use custom hostnames in your cluster:

  1. On the Install Options screen, select Perform Manual Registration for Ambari Agents.

  2. Install the Agents manually as described in Installing Ambari Agents Manually.

  3. For every host, create a script (for example named /tmp/hostname.sh) to echo the custom name you want to use for that host. For example:

    #!/bin/sh
    echo <ambari_hostname>
  4. With a text editor, open /etc/ambari-agent/conf/ambari-agent.ini on every host and add the following information:

     

    Table 6.1. ambari-agent.ini

    SectionValue
    [server]Change the hostname to the host for the Ambari Server. This is the server that the Agent registers to.
    [agent]Add this line to the agent section: hostname_script=/tmp/hostname.sh (or whatever you have named your script)


  5. Add the hostnames to /etc/hosts on all nodes.


loading table of contents...