I am trying to configure NIS master in test server. I am using centos 7.
/usr/lib64/yp/ypinit -m
The local host’s domain name hasn’t been set. Please set it.
I am trying to set NISDOMAIN name in /etc/sysconfig/network but same error is coming again and again.
Please help , how to set dnsname and nisdomain name in centos 7
Configure the /etc/hosts file, add hostname to the hosts file
#vim /etc/hosts
XX.XX.XX.XX(ip add) fqdn hostname
And also check the configuration file /etc/yp.conf, NIS Server also needs to be set up as a client. Edit the /etc/yp.conf file and add the following line:
# vim /etc/yp.conf
domain DOMAIN-NAME server 127.0.0.1
(or)##any one of these##
ypserver 127.0.0.1
It is as @raghuu pointed out. You have to edit the /etc/hosts file in order to set the name of the server. This is for Domain Name Server resolution, but it is not a DNS exactly. Just for local resolution.
In the oder hand you can also execute the following command line to change the hostname: