How to set the fqdn on a CentOS server?
8,815
Add the host to the /etc/hosts file for DNS resolution :
10.1.2.3 host.example.com host
Related videos on Youtube
Author by
mimipc
Updated on September 18, 2022Comments
-
mimipc over 1 year
I set my hostname in the /etc/sysconfig/network file to host.example.com
HOSTNAME=host.example.com
Fyi, I then issued a reboot on the machine.
I have a problem with Puppet: when I run Facter on this machine, it returns the following information :
#facter fqdn
host.com
So puppet generates a wrong certificate and so on...
Here is what happens on my host :
# hostname
host.example.com
# hostname --fqdn
example.com
# hostname -y
(none)
# dnsdomainname
com
I don't understand why Facter is getting the wrong information... What did I do wrong?