Configure a DNS

  1. Add the DNS entries in the /etc/resolv.con file as follows: nameserver DNS-server-IP
  2. To set the hostname for CentOS 7.X and RedHat 7.X by any one of the following methods:
    • Add an FQDN in the /etc/hostname file.
    • Execute the following command and reboot a server: # hostnamectl set-hostname your-new-hostname