[CentOS] Changing hostname?
mm at gcug.de
Sat Sep 13 16:38:21 UTC 2008
> 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.
> 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
> 127.0.0.1 localhost.localdomain localhost calimero.local
^^ -> should be:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 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 127.0.0.1 from
localhost and either define the hostname on a static interface or DHCP
assigned (or put a sticker on it ;).
More information about the CentOS