Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


BlueVM VPS - How to Change Hostname
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.

BlueVM VPS - How to Change Hostname

aubsaubs Member
edited May 2012 in Help

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...

  • subigosubigo Member

    @joodle said: 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.

  • aubsaubs Member
    edited May 2012

    @subigo said: 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 have
    full.ip.address sub.domain.name sub e.g. 1.2.3.4 my.host.co.uk my, rather than just
    full.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?

  • aubsaubs Member

    @gsrdgrdghd said: 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!

  • @gsrdgrdghd said: Why should /etc/hosts have any entries other than "127.0.0.1 localhost" anyway?

    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.

  • DimeCadmiumDimeCadmium Member
    edited May 2012

    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)

  • yomeroyomero Member

    For a moment I thought BlueVM was changing his name... :|

  • BlueVMBlueVM Member

    Its in your control panel under the "Network" icon.

  • aubsaubs Member

    @BlueVM said: Its in your control panel under the "Network" icon.

    >

    Thank you. Thought I replied to this a long time ago.

Sign In or Register to comment.