Efficient way to change server hostname

3 posts / 0 new
Last post
#1 Tue, 07/21/2009 - 04:48
tristanleboss

Efficient way to change server hostname

Hello,

I am not a real newbie because I use VirtualMin for years but this time I feel like one : I try to efficiently change the "system hostname" of my server (the one you type during installation; at least using the "install.sh" file). I think it's used by a lot of place in VirtualMin/WebMin so I was thinking there is probably a place to change it globally but I can't found it ... neither through the search feature of VirutalMin nor through one forum topic.

Thanks in advance.

Tristan

Tue, 07/21/2009 - 05:22
ronald
ronald's picture

you can do over ssh and type at the prompt: hostname something.domain.tld

or webmin - networking - Network Configuration - Hostname and DNS Client and use the field: Hostname

Tue, 07/21/2009 - 10:52
tristanleboss

Ronald, thanks for your reply.

I was aware of this command but wasn't sure I just needed to execute it ;) without modifying other config files. But sometimes it's better to be sure :)

Edit : Afterwards, I noticed the PostFix mail server had some troubles processing incomming mails (https://www.virtualmin.com/node/10656). It's related to the hostname change: you have to update the "/etc/postfix/main.cf" file => "myhostname" line should contains your new hostname and "mydestination" one should contains both your new hostanme and "localhost".

Tristan

Topic locked