Support Questions

Find answers, ask questions, and share your expertise

Setup FQDN for Ambari install

avatar
Rising Star

Hi all,

I've 4 VMs on a vps with internet access through a rebond but not visible from the internet. My problem is that i couldn't set the FQDN for each VM. I added this line to /etc/hosts for every VM: "10.10.10.x VMx.local VMx" where x is the number of the VM

Any one have an idea about how to set the FQDN ? and if not is it possible to use IP instead of FQDN ?

i've this config:

Public repond: IP : 151.xx.xx.xx

from the rebond with ssh:

VM | eth0 | | eth1 | VM1 : 192.168.1.10 10.10.10.1 VM2 : 192.168.1.11 10.10.10.2 VM3 : 192.168.1.12 10.10.10.3 VM4 : 192.168.1.13 10.10.10.4

Thanks.

1 ACCEPTED SOLUTION

avatar
Master Mentor
@Zaher Mahdhi

Your best shot is to manage the setup through /etc/hosts

Have entries in /etc/hosts in each clutser node and also, have the same setup in /etc/hosts of your local machine.

View solution in original post

10 REPLIES 10

avatar
Master Mentor
@Zaher Mahdhi

Your best shot is to manage the setup through /etc/hosts

Have entries in /etc/hosts in each clutser node and also, have the same setup in /etc/hosts of your local machine.

avatar
Master Mentor

avatar
Master Mentor

avatar
Rising Star

I added this lines to /etc/hosts in every VM 10.10.10.1 VM1.local VM1 10.10.10.2 VM2.local VM2 10.10.10.3 VM3.local VM3 10.10.10.4 VM4.local VM4 Now i'm able to use "ping VMx" from every VM and ssh user@VMx works too.

hostname -f returns VMx.local

is this fine ?

avatar
Master Mentor

@Zaher Mahdhi Yes, that works

avatar
Rising Star

Thanks all, I used this method to setup the hostname and it worked ! My cluster is running now 🙂

avatar
Master Mentor

@Zaher Mahdhi Please accept the answer to close the thread 🙂

avatar
Master Mentor

You need to set hostbame in /etc/sysconfig/network i dont remember exact path but check with your OS documentation. Then run

hostname

hostname -f

avatar
Master Mentor