Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a server that is currently running as servername, but I need it to be servername.domain.com (the IP already resolves to servername.domain.com), and I currently have:

0.0.0.0 servername.domain.com

in /etc/hosts. What else do I need to do to get the server set up with the IP correctly?

This is the first time I've done anything like this - I can be more specific if needed.

If this is the wrong place to be posting this - please point me in the right direction.

share|improve this question
    
Does your /etc/hosts really have the IP as 0.0.0.0, or is that something that you are using as a placeholder? What is the output of the hostname command. –  Kirk Jun 14 '11 at 4:32
    
0.0.0.0 is a placeholder. servername is the output of hostname. –  U. Hudson Jun 14 '11 at 4:34
    
So is the problem that you are trying to solve that servername.domain.com doesn't resolve from an additional host? or that the FQDN doesn't resolve from the server itself? Or is it more basic than that? Can you provide the output from a command that is problematic (other than hostname)? –  Kirk Jun 14 '11 at 4:37
    
the IP resolves to servername.domain.com, however hostname lists servername, so it appears the server doesn't know it's real name (if that's the way to put it). This seems to be problematic for things such as running a mailer daemon. –  U. Hudson Jun 14 '11 at 4:41
    
So if you ping server.domain.com from the server itself, it responds appropriately? None of my mail servers show their FQDN at the hostname command, or at the shell prompt. However, they all know what their FQDN is, and are able to reach it appropriately. Which mail server are you looking at? –  Kirk Jun 14 '11 at 4:56

1 Answer 1

If you want to be able to go to another computer and type ssh servername.domain.com or point a web-browser at http://servername.domain.com, you should find your local DNS server (if any) and add the entry there to the DNS configuration files. If you don't have a local DNS server then you need to add the entry to every computers hosts file.

On the Ubuntu server you can add the domain to /etc/resolv.conf but there's probably a handy GUI configuration tool for doing this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.