Every time I boot, CentOS 6.0 Server hostname disappears. I have to re-issue hostname command to reset it.
Please help!
you need to set your host name properly in /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost
DOMAIN=localdomain
GATEWAY=yourgatewayaddress
Add a line
HOSTNAME=your.hostname.tld
to the /etc/sysconfig/network
file to set the hostname to your.hostname.tld
/etc/resolv.conf
and, optionally, in a DOMAIN=
variable in the same file.
Mar 22, 2012 at 13:34