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.


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment