[CentOS] Changing hostname?

Sat Sep 13 16:38:21 UTC 2008
Marcus Moeller <mm at gcug.de>

Dear Robert.

> Per "man hostname"
>       /etc/hosts /etc/sysconfig/network
>       Note that hostname doesnât change anything permanently. After reboot
> original names from /etc/hosts are used again.

That's clear.

> Do you really think one should tie the hostname to the loopback interface in
> the /etc/hosts file

If it's not necessary to set the hostname on the loopback interface,
don't do so.

> We recommend that one should not tie the actual hostname or FQDN to the
> loopback interface.
> There are very few limited implementation or security seclusion cases where
> you would want to consider doing that

I have mentioned Arnt's statement on that.

> It should look like this as example in /etc/hosts
>       localhost.localdomain localhost calimero.local

^^ -> should be:       localhost.localdomain localhost
I guess.

or even:      localhost        localhost.localdomain
(see discussion on the Debian ML)

> x.y.z.a calimero.some123domain.com calimero
> if the machine is not talking to another machine via network, then the
> hostname doesn't really matter too much now does it?

No, it does not. For me it's just nice to see on which host I am
working (even if it's local only).

Btw. Most major distributions set the hostname on the loopback
interface and even old-style distributions like Slackware do so (with
an advice) now.

But I agree, if you do not really need it, don't change from
localhost and either define the hostname on a static interface or DHCP
assigned (or put a sticker on it ;).

Best Regards