The FQDN is the abbreviation for fully qualified domain name, meaning the full domain name. For example, if a machine hostname (hostname) is www and the domain suffix is example.com, the FQDN of the host should be www.example.com. In addition, the FQDN is in fact the "." To the end, but most applications and servers allow the last point to be ignored.
Linux allows users to view and set host names through the hostname command. The user can also get the FQDN of the host through the Hostname-f command. However, there is no command to set the FQDN directly. The following is a brief introduction to the Setup method.
First set the host name in the/etc/hostname file:
vi /etc/hostname
Elk
Then add a row of host records in the/etc/hosts file, the first field is the IP address of the host, the second field is the FQDN you want to set, and finally the host name you just set:
VI /etc/hosts127.0. 0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost Localhost.localdomain localhost6 localhost6.localdomain6192.168. 7.27 elk.server.com Elk
Update the hostname with HOSTNAME-F/etc/hostname. To see the FQDN through Hostname-f:
hostname -f/etc/hostnamehostname -hostnameElk
Linux set FQDN