Warren Post
2013-03-22 14:04:15 UTC
I'm trying to understand the generally accepted best practice for
setting a fully qualified domain name on Linux generally and on Mageia 2
specifically. My efforts to RTFM and STFW lead me to so much
contradictory information that I am confused, not enlightened.
Here's what I understand; please correct my errors:
To check your short host name, as user run:
hostname
And to check your FQDN, add the "-f" argument:
hostname -f
Then to change your short host name and FQDN (replacing "host" and
"host.domain.tld" as appropriate), as root edit /etc/hosts to contain
the lines:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 host.domain.tld host
Also as root, edit /etc/sysconfig/network to contain the line:
HOSTNAME=host.domain.tld
Reboot and check your work as above. When all is well, add the files you
edited to your backup set.
Is the above best practice? If not, what should I be doing?
setting a fully qualified domain name on Linux generally and on Mageia 2
specifically. My efforts to RTFM and STFW lead me to so much
contradictory information that I am confused, not enlightened.
Here's what I understand; please correct my errors:
To check your short host name, as user run:
hostname
And to check your FQDN, add the "-f" argument:
hostname -f
Then to change your short host name and FQDN (replacing "host" and
"host.domain.tld" as appropriate), as root edit /etc/hosts to contain
the lines:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 host.domain.tld host
Also as root, edit /etc/sysconfig/network to contain the line:
HOSTNAME=host.domain.tld
Reboot and check your work as above. When all is well, add the files you
edited to your backup set.
Is the above best practice? If not, what should I be doing?
--
Warren Post
http://my.opera.com/wpost/
Warren Post
http://my.opera.com/wpost/