File "/etc/hostname" with FQDN or not?

Discussion in 'Installation/Configuration' started by danielzanin, Dec 8, 2014.

  1. danielzanin

    danielzanin New Member

    First, sorry for my English.
    In Debian documentation: https://www.debian.org/doc/manuals/debian-reference/ch03.en.html in chapter "3.2.5. The hostname", the author makes it clear that we should not use the FQDN in the file /etc/hostname: "This file should contain only the system hostname, not a fully qualified domain name."

    Why in the tutorial http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3-p3, Falko says it's important to be FQDN?

    Extracted from the original text:
    Now run
    Code:
    echo server1.example.com > /etc/hostname
    /etc/init.d/hostname.sh start
    Afterwards, run
    Code:
    hostname
    hostname -f
    "It is important that both show server1.example.com now!"

    Someone could help me with this issue?

    Tks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The reason is that in early debian wheezy releases, the amavisd package from debian required that /etc/hostname contained a fqdn. In the meantime, thy fixed the package so that you can use a non fqdn (while using the fqdn has no negative effects) when you configure the correct fqdn in /etc/hosts so that:

    hostname -f

    returns the fqdn.
     
  3. danielzanin

    danielzanin New Member

    Thank you Till for the help!
     

Share This Page