[CentOS] Changing hostname?

Marcus Moeller mm at gcug.de
Sat Sep 13 15:41:52 UTC 2008


2008/9/13 Niki Kovacs <contact at kikinovak.net>:
> Marcus Moeller a écrit :
>>
>>> From Slackwares /etc/hosts:
>>
>> ...
>> # By the way, Arnt Gulbrandsen <agulbra at nvg.unit.no> says that 127.0.0.1
>> # should NEVER be named with the name of the machine.  It causes
>> problems for some (stupid) programs, irc and reputedly talk.
>> ...
>
> I'm familiar with that one. Been a long-time Slackware user before. Though
> lately I don't follow this caveat anymore, as I have yet to come across one
> of said stupid programs. And BitchX doesn't seem to mind.

I agree on that and Pat just add it as a notice. My advice is to set
'localhost' or 'localhost.localdomain' (which should not really matter
but 'localhost' first is best practice) and all your other hostnames
as aliases.

Of course it 'may' also work if you add two lines for 127.0.0.1
(Ubuntu did it that way just a while) but this is just because FCFS.

Concerning RH or CentOS: I have to define /etc/hosts on all machines
that do not obtain their hostname via DHCP. I have not yet figured out
that the HOSTNAME variable in /etc/sysconfig/network is used in any
form (correct me if I am wrong).

Best Regards
Marcus



More information about the CentOS mailing list