Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat May 07, 2011 4:03 am 
Offline
Newbie

Joined: Sat May 07, 2011 3:42 am
Posts: 2
Hello people,

recently I have installed Ubuntu 11.04 to VPS and have changed hostname using following steps:
1. Create /etc/hostname file and put "mydomain.com" to it
2. Edit /etc/hosts file and put these new lines:
Code:
127.0.1.1  mydomain.com
123.456.789.0 mydomain.com

where 123.456.789.0 is IP address of VPS.
3. Type as root:
Code:
# hostname mydomain.com


After these operations, hostname was changed, but it has been reverted back to default Linode's value in three cases:
1. Just after some hours.
2. After VPS reboot.
3. After doing
Code:
# service networking restart

I have no this problem with older Ubuntu versions: 9.10, 10.04, 10.10 on Linode VPS.


Top
   
 Post subject:
PostPosted: Sat May 07, 2011 10:00 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Try this:
http://library.linode.com/getting-start ... ian-ubuntu


Top
   
 Post subject:
PostPosted: Sun May 08, 2011 10:55 am 
Offline
Newbie

Joined: Sat May 07, 2011 3:42 am
Posts: 2
Thanks waldo!

I have commented SET_HOSTNAME='yes' in /etc/default/dhcpcd and at least after restarting "networking" service, hostname has not reverted.


Top
   
 Post subject:
PostPosted: Sun Jun 26, 2011 5:21 am 
Offline

Joined: Sun Jun 26, 2011 4:25 am
Posts: 1
Location: United Kingdom
Thanks, Waldo. So useful!

I am a cloud newbie and can see why dhcpcd is used and why I never hit this one before. Saved a lot of pulling out of hair!


Top
   
 Post subject:
PostPosted: Tue Oct 04, 2011 1:40 pm 
Offline
Junior Member

Joined: Tue Oct 13, 2009 9:47 pm
Posts: 22
Website: http://imknight.net
Location: Singapore / Malaysia
i have comment out the setting as per the doc, but still facing the same problem, any one can help ?


Top
   
 Post subject:
PostPosted: Wed Oct 05, 2011 8:54 am 
Offline
Senior Newbie

Joined: Fri Aug 05, 2011 6:15 am
Posts: 15
knight wrote:
i have comment out the setting as per the doc, but still facing the same problem, any one can help ?


If you have not already done so, try rebooting the linode. That is what it took for one of the debian systems I'm managing to finally get in line.

Make sure /etc/hostname contains the correct hostname for your server prior to rebooting.


Top
   
 Post subject:
PostPosted: Wed Oct 05, 2011 8:56 am 
Offline
Junior Member

Joined: Tue Oct 13, 2009 9:47 pm
Posts: 22
Website: http://imknight.net
Location: Singapore / Malaysia
it seem like reboot does the trick , thanks !


Top
   
 Post subject:
PostPosted: Wed Oct 05, 2011 8:58 am 
Offline
Senior Newbie

Joined: Fri Aug 05, 2011 6:15 am
Posts: 15
knight wrote:
it seem like reboot does the trick , thanks !


You are welcome, however before you jump for joy check it in a few hours and see if it reverted, if not then cheer.

Good luck. :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group