I would choose a consistent approach across le entire environment. Both solutions work fine et will remain compatible avec le plus applications. Il y a a difference in manageability, though.
I go avec le short name as le HOSTNAME setting, et définissez le FQDN as le premier column in /etc/hosts for le server's IP, followed by le short name.
J'ai pas encountered beaucoup de software packages that enforce ou display a preference entre le two. I find le short name to be cleaner for certains applications, specifically logging. Maybe J'ai been unlucky in seeing internal domains like server.northside.chicago.rizzomanufacturing.com. Who wants to see that in le logs ou a shell prompt?
Sometimes, Je suis involved in company acquisitions ou restructuring où internal domains and/or subdomains change. I like using le short hostname in these cases parce que logging, kickstarts, printing, systems monitoring, etc. do pas need full reconfiguration to account for le nouveau domain names.
A typical RHEL/CentOS server setup for a server named "rizzo" avec internal domain "ifp.com", would look like:
/etc/sysconfig/network:
HOSTNAME=rizzo
...
-
/etc/hosts:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.100.13 rizzo.ifp.com rizzo
-
[root@rizzo ~]# hostname
rizzo
-
/var/log/messages snippet:
Dec 15 10:10:13 rizzo proftpd[19675]: 172.16.100.13 (::ffff:206.15.236.182[::ffff:206.15.236.182]) - Preparing to
chroot to directory '/app/upload/GREEK'
Dec 15 10:10:51 rizzo proftpd[20660]: 172.16.100.13 (::ffff:12.28.170.2[::ffff:12.28.170.2]) - FTP session opened.
Dec 15 10:10:51 rizzo proftpd[20660]: 172.16.100.13 (::ffff:12.28.170.2[::ffff:12.28.170.2]) - Preparing to chroot
to directory '/app/upload/ftp/SRRID'