New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
BlueVM VPS - How to Change Hostname
I've installed Ubuntu 12.04.
When I do sudo hostname
, it comes up with my HyperVM username. If I do the following:
sudo hostname my
sudo nano /etc/hosts
and add 1.2.3.4 my.host.co.uk my
sudo nano /etc/hostname
and add my
then reboot, all the above show my HyperVM username again. Checking them before reboot shows them all correctly.
Yes, I have done Ctrl+O
then Ctrl+X
after changing each file using nano.
Any suggestions?
Edited title
Comments
You can change the hostname in the control panel...
^
OpenVZ containers pull their hostname from the default configuration file for the container. It has to be changed from within the control panel.
Oh right, thanks guys. I haven't seen that with any other VPS I've had before, though that's maybe because I've set it correctly in the first instance.
Shouldn't
/etc/hosts
havefull.ip.address sub.domain.name sub
e.g.1.2.3.4 my.host.co.uk my
, rather than justfull.ip.address sub
e.g.1.2.3.4 my
?Why should /etc/hosts have any entries other than "127.0.0.1 localhost" anyway?
Good question, I don't entirely know. I guess I've found in the past that things just haven't quite worked without!
It's helpful if your "hostname" is NOT a FQDN.
sendmail
in particular can get hung up on that, delaying startup for other daemons upon init.It doesn't have to have the hostname pointing to 127.0.0.1, but if it doesn't it will have to go pull a DNS record for any app that goes off the hostname, etc. Also sendmail as noted (cause sendmail is crap).
(Additionally, the rDNS for an IP will show up as the first entry in /etc/hosts, though that usually is unimportant)
For a moment I thought BlueVM was changing his name...
Its in your control panel under the "Network" icon.
>
Thank you. Thought I replied to this a long time ago.