Once the instances are created, set a hostname for each node and then add an entry to /etc/hosts file so that the nodes can locate each other. You can also use DNS if it’s available in your environment.

  1. use hostnamectl command to set a hostname:

  1. If a DNS server is available, register your hostname(s) using the server. If there is not a DNS server available, using /etc/hosts is recommended to resolve the hostnames.

  1. Add the following lines to the /etc/hosts file so that node-a and node-b can be resolved to an IP address(es).

  1. Create a backup of /etc/hosts, edit the file and confirm the changes.

  1. Make sure you can ping these nodes by name.

フィードバック

フィードバックありがとうございました

このトピックへフィードバック

送信