I'm making some system hostname changes across a few environments and this got me thinking...
When I change a server's hostname (live), what needs to be modified and which system services require a restart? Assume this is done online without a reboot.
I encounter a lot of systems built by other people where hostname changes are made in-flight, but the changes either do not persist across a reboot, or I notice that
/var/log/messages are stamped with a different hostname.
I regularly follow:
/etc/hostsaccording to these guidelines.
On the daemon side...
- sendmail/postfix (matching hostname is required)
- cups (print daemon may stop with bad hostname)
- syslog/rsyslog (hostname is logged along with system messages)
- httpd (proper hostname is required)
What else requires attention?