[Techtalk] /etc/hosts

k.clair kclair at karl.serve.com
Wed Oct 2 09:36:49 EST 2002


Putting it in /etc/hosts I believe will enable the machine to recognize
itself by a hostname instead of an IP. You can also reset the hostname
using the "hostname" command. Without an argument, hostname will return
the hostname, but given an argument (a hostname) it will set the
hostname.

In terms of other computers on the internet recognizing your computer by
its hostname rather than by the IP, you will probably need to get
someone who does DNS (most likely the service provider) to provide you 
with a PTR record which would map
the IP address to the hostname (which would obviously need to be a fully
qualified domain) of your computer.  This mostly comes up when you are
trying to connect to some other service on another computer somewhere
from your computer... often the other computer will do a reverse lookup
on your IP to make sure you are who you say you are.

kristina

On Wed, Oct 02, 2002 at 06:27:10AM -0700, Therese Gustafsson wrote:
- Hi everyone!
- 
- I need some help. I'm doing some php-programming for
- my father. The development server used to be at my
- brothers place. But he moved this weekend and my
- father moved the server to the company that they (my
- fathers company) get their internetconnection from.
- Now my problem is that the server doesn't have a
- hostname anymore, it only has an ip-address. I'm
- wondering what I should put in /etc/hosts now? Should
- I only put the current ip-address or should I make up
- a hostname and put there even if the server doesn't
- have one. (To make it clear, I'm the only one supposed
- to have access to it until the system is finished and
- then the system is going to be put on another
- computer.) 
- 
- My brother also put phpmyadmin on it so I could
- administrate the mysql-database easier. I can get to
- the first page of it fine, but when I try to click on
- a link to choose a database it tries to connect with
- my brothers old hostname. I don't know where to look
- to fix that. Do you have any ideas?? Could that be
- because /etc/hosts contains his old hostname still?
- (His old hostname is on the localhost line...don't ask
- me why...That's not where it should have been right?)
- 
- Perhaps there are more things to change? The only
- thing they changed was that they changed the
- ip-address of the computer from dhcp to static. Is
- there something else that I must do? It's RedHat 7.3
- by the way.
- 
- I really do appreciate any help. 
- 
- /Therese
- 
- __________________________________________________
- Do you Yahoo!?
- New DSL Internet Access from SBC & Yahoo!
- http://sbc.yahoo.com
- _______________________________________________
- Techtalk mailing list
- Techtalk at linuxchix.org
- http://mailman.linuxchix.org/mailman/listinfo/techtalk



More information about the Techtalk mailing list