Confusion About /etc/hosts File

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have never understood Arch's approach to properly setting a FQDN on
a server. According to the Wiki...and I will quote:

"Add your hostname, coinciding with the one specified in /etc/rc.conf,
as an alias, so that it looks like this:

127.0.0.1   localhost.localdomain   localhost yourhostname

If you use a static IP, add another line using the syntax: <static-IP>
<hostname.domainname.org> <hostname> e.g.:

192.168.1.100 yourhostname.domain.org  yourhostname"

Now this does not work for me and maybe I am not understanding this
but my server hostname is "mail" and it will be managing a domain
called "iamghost.com" so I need my output of the command 'hostname -f'
to result in 'mail.iamghost.com' and when I follow the guide, that is
not what I get.

Obviously my server has a static IP so I followed the Wiki as shown below:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost mail
10.1.1.200      mail.iamghost.com     mail

The above gives me the correct output when I run the 'hostname'
command = 'mail' but when I run the 'hostname -f' command, I get
localhost.localdomain. This will cause severe failures in MySQL and
Postfix. Not to mention all my certificates I self sign / generate
will not have the proper info. Can someone please explain to me why
this does not work for me? Normally in distributions like CentOS,
Debian, Slackware, etc etc etc...I am able to just enter a hostname
and domain name for the system.

Thanks!


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux