This page explains how to change a system's ?hostname(1) (i.e rename a computer/server)
Rename a computer
Core networking
Update /etc/hosts, so local address resolves with the new system name.
Reload the network configuration
This will temporarily disconnect your system from the network (ssh usually resists short disconnection)invoke-rc.d networking force-reload
ToDo: is it useful to invoke-rc.d network-manager forrestartce-reload ?
Application specific
avahi
Avahi is used to publish (announce) local services. Reloading it probably helps
invoke-rc.d avahi-daemon force-reload
other
(to be written)