LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   best pratice for hostname? FQDN vs short? (https://www.linuxquestions.org/questions/linux-networking-3/best-pratice-for-hostname-fqdn-vs-short-701926/)

zerobane 02-03-2009 09:34 AM

best pratice for hostname? FQDN vs short?
 
What is the best pratice for hostnames and why?

my typical server setup for rhel4 or rhel5 installs:

/etc/sysconfig/network
hostname=hostname.domain.com

/etc/hosts/
1.1.1.1 hostname.domain.com hostname

/etc/resolv.conf
domain domain.com
search domain.com
nameserver 1.1.2.3

Any reasons you should not be using the fqdn?

MensaWater 02-03-2009 01:45 PM

FQDN for most uses. You can always get shortname by adding it to hosts with a shortname alias to FQDN or adding search domain to your /etc/resolv.conf for name lookups.

That is to say you always want to name the box with FQDN but don't want to have to always type FQDN to access the box. Aliases and search domains allow you to do both.


All times are GMT -5. The time now is 01:06 PM.