View previous topic :: View next topic |
Author |
Message |
rhumbliner n00b
Joined: 15 Nov 2004 Posts: 59 Location: Las Vegas
|
Posted: Sat Oct 05, 2013 3:15 pm Post subject: where does domain name come from? |
|
|
i ran across an interesting problem today. i'm maintaining several servers and typically set the domain name in the hosts file:
Code: | 10.1.1.5 server1.mydomain.com |
but when building a new server i overlooked the hosts entry and was surprised to see that it picked up the correct domain name anyway. a little research showed i had this line in /etc/resolv.conf: Code: | search mydomain.com |
i decided this was a cleaner method for setting the domain name so i adjusted my other servers so that hosts simply lists the hostname and resolve.conf lists the domain name. problem is, that method only works for my new server and not the rest. what am i missing here?
in summary, this setup works on some machines but not others:
/etc/hosts
/etc/resolv.conf Code: | search mydomain.com |
Code: | hostname -f
server1.mydomain.com |
tia |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
rhumbliner n00b
Joined: 15 Nov 2004 Posts: 59 Location: Las Vegas
|
Posted: Sat Oct 05, 2013 9:03 pm Post subject: |
|
|
Code: | {~} cat /etc/conf.d/hostname
# Set to the hostname of this machine
hostname="server1"
|
|
|
Back to top |
|
|
|