• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

How do I change the hostname?

E

ergos

Guest
Hi all,
how can I change the hostname of my box from localhost.localdomain to something different?

Thanks in advance,
Filippo

(running plesk 8.0.1)
 
In your control panel, click on "Server" then "Server Preferences" - you'll see where you can change the hostname. What I normally do then is through SSH do:

#hostname new.host.name

This works for RedHat and CentOS.
 
Another side note, after you issue the shell command, your active console wont update by itself. Typically, the command "reset" will reset your SSH console, allowing any changes to show properly. (I.e. your new hostname will appear as NewHostname@~: instead of OldHostnaame@~:..

Just a bit of a quick fix, keeps from having to log back in and log back out...

-John
 
Using the hostname command doesn't make the change permanent (reboot and it's changed back). Also it doesn't update the configuration of qmail and some other apps (I believe).

Better change it through Plesk, as that also updates files like /etc/sysconfig/network (to make the change permanent after reboots, which you can do yourself as well, of course) and /var/qmail/control/me. Probably more...
 
Back
Top