How to change full hostname of my server? Give me some opinions

freshmint

Verified User
Joined
Oct 10, 2005
Messages
120
I want to change the domain name of my server from something.blablabla.com to somethingelse.blebleble.com, is that possible?

I searched the forum and found these three possibilities:

1. Changing it on the Admin Level > Administrator Settings > Server's Hostname.
2. Running the /usr/local/directadmin/scripts/hostname.sh script.
3. Running the hostname system command (though I'm sure this is possible highly not recommended as it would confuse DA).

I'm not sure which one would work better or even if they're the same thing.

Can anyone please give me some comments? :)

Should I expect any problems after the change?
 
I'm new to DirectAdmin, and I had to do this the other day to set it to a hostname that would better fit into my DNS settings.

I just had to do this the other day. I ran the hostname.sh script, and then had to change the Admin Level > Administrator Settings > Server's Hostname, as the server warned me that the hostname was not correctly set.

I also found that I had to comment out the old hostname in /etc/hosts, as both the new and the old name were listed. After this everything seemed to work fine.

As jlandes says, make sure the hostname resolves. If it doesn't then something else is wrong.
 
I checked the hostname.sh script and it doesn't modify any /var/named/*.db files. Will I have to do that manually?
 
No, you will not have to manually edit the bind files. The script does change the IP in the db files, although I do not see the exact entry in the script that does it.

Just make sure that the domain(s) you have on the server resolve to the correct IP after running the script (after performing the tasks that I mentioned above).


Sean
 
Back
Top