Centos – Configure domain name in CentOS

centoscentos5configurationdomain-namedomain-name-system

How do I configure domain names in Cent OS?

I am actually connecting to the servers via SSH remote terminal and I also have root credentials. Does configuring the /etc/sysconfig/network and /etc/hosts suffice? Would be great to have some steps or configuration guides..

Best Answer

Four things to do:

  • Add the hostname entry to /etc/hosts. Use the format detailed here.

  • If your hostname is "your_hostname", type hostname your_hostname at a command prompt to make the change effective.

  • Define the hostname in /etc/sysconfig/network to make this setting persist across reboots.

  • Reboot the system or restart services that depend on hostname (cups, syslog, apache, sendmail, etc.)

Related Topic