LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-28-2007, 03:11 PM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Rep: Reputation: 31
My hostname is NOT resolving correctly


Last night I installed Apache,Mysql and php in my Fedora box for testing/studying purposes. I changed my hostname to "fidel", but when I type fidel at the browser it takes me to a wiki page about fidel castro. How do I resolve this? Do I need to setup a DNS server also? thanks
 
Old 08-28-2007, 03:35 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
you have no dns. the client isn't going to magically know what the server is called. if you want a simple dns implementation, i'd strignly recommend dnsmasq for a 2 minute setup.
 
Old 08-28-2007, 04:14 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
You can edit /etc/hosts and add the IP/hostname there.

Dave
 
Old 08-28-2007, 04:31 PM   #4
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
I'm looking at it:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
127.0.0.1 localhost

Can you give me an example of how should I edit this? thanks!
 
Old 08-28-2007, 05:07 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Quote:
Originally Posted by cucolin@ View Post
Can you give me an example of how should I edit this? thanks!
In your case "fidel" is an alias for the machine. "man hosts" (try that in a terminal window) says: "IP_address canonical_hostname aliases", your example: "127.0.0.1 localhost fidel".
 
Old 08-29-2007, 10:22 AM   #6
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
Thanks for the info. unSpawn! I will try this tonight.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
locally resolving hostname Hewson Linux - Networking 3 05-16-2007 06:44 PM
Resolving a hostname from it's ip? Infernal211283 Linux - Networking 3 01-09-2006 05:09 AM
hostname updated, but not resolving ericnmu Linux - Networking 5 09-09-2004 05:34 AM
network up, but not resolving correctly. BrianK Linux - Networking 8 07-06-2004 02:37 PM
Resolving Hostname on Slackware MrCarl Linux - General 3 11-05-2003 06:39 PM


All times are GMT -5. The time now is 08:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration