Re: hostname change how to....
Eric Koldeweij <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
I assume you already know you have to run the hostname command to really change the hostname ;) You only need to set the hostname and restart the services which config files are affected. In your case only named and network need to be restarted. I think that will cover pretty much all but of course I do not know what services are running on the box in question :) One thing that does come to mind is up2date. I think running up2date --hwprofile after changing the hostname will cover that too. Also check apache's conf if the host name appears there. If not, no restart necessary. Also, if you have your own firewall script, check that thoroughly, or you might lose all forms of remote access to the box :) It might be handy to leave the old hostname in /etc/hosts for a short while together with the new one, in case you forgot something (or one of the web developers uses the old name for http access in their web pages) A reboot is only necessary in Linux if there's a kernel change, and changing the hostname isn't. Besides that only affected services need to be restarted. Usually, giving the process a killall -HUP is sufficient. Sometimes though so many services need to be restarted that a reboot is easier :) Except for the few minutes downtime, there's nothing against a reboot. It'll take several hours before a DNS change is propagated through the internet. Since people who access the box using the host name you want to change might not be aware of the change it might also be handy to leave the old name in DNS too for a while. If the old hostname is used for web access directly, I also recommend installing a small "We have moved, click here or wait a few seconds" html page which will pop up when the old host name is accessed. In that case the administrators of the 700 web sites (and those authors of outside pages who link to a page on your server) have some work to do too, though the appearance of the move script will certainly give them a clue. Since the internet is full of dumbos, expect the worst :) Also, hits on the move script will be logged and tell you the old host name *IS* being used! Hope this helps, Eric. System wrote: >Hello All, > >I have RH 7.2, Apache 1.3.27 & Bind 9 with around 700 websites. I need to >change the hostname of the server. What effect will it make if I change the >server's hostname? > >The files I should be editing are: >- /etc/hosts >- /etc/sysconfig/network >- /etc/named.conf >- /var/named/ > >Anything else should be taken care off? Should I reboot the server or only >restart the deamon. >