Re: How to set hostname and domainnmae in CentOS 7?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 6 April 2016 at 15:45, Mark Haney <mark.haney@xxxxxxxxxxxxxx> wrote:

> Not sure about everyone else, but I always put my hostname in /etc/hosts.
> Maybe that's from years of not always having DNS available back when the
> earth was cooling.
>
>
This behaviour plays havoc with templated VMs though or any time you can't
be sure the IP there will be correct ...

At which point you start having to script fixing it etc or weird things
happen.

I can't recall if it hit EL7 yet but Fedora has nss-myhostname so it'll
probably arrive in EL7 eventually to ensure the local hostname is always
resolvable to the system IP if it exists or at least   127.0.0.2 so stuff
relying on gethostname() doesn't have issues and  the older /etc/hosts
shenanigans are not required.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux