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.