LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2012, 11:12 PM   #1
sureshpanchanathan
LQ Newbie
 
Registered: Jan 2012
Posts: 16

Rep: Reputation: Disabled
entry in /etc/hosts file for localhost localhost.localdomain


Hi All,

I need your valuable advise. I am trying to install Oracle 11g on Oracle Linux 6.2. While I was going through an article on installing 11g, I came across the following lines:

Make sure that there is an entry in /etc/hosts file for your machine like this:

[IP-address] [fully-qualified-machine-name] [machine-name]


/*
Where "fully-qualified-machine-name" is your
"machine_name"."domain_name"
*/


when I opened the /etc/hosts file following entry was there:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain

Is the above entry currently on /etc/hosts is correct? If not then I would like to understand what I should enter on the file /etc/hosts? How I can find what is the localhost localhost.localdomin details.

Thanks
Suresh Panchanathan

Last edited by sureshpanchanathan; 02-08-2012 at 11:14 PM.
 
Old 02-08-2012, 11:15 PM   #2
eeekster
Member
 
Registered: Sep 2011
Posts: 163

Rep: Reputation: Disabled
The entry you show is for localhost. What you need is the real name of your machine and the domain that name exists it.
 
Old 02-09-2012, 05:52 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Every machine has an entry for itself to talk to itself.
You've got 1 entry there for IPv4 and one for IPv6; all perfectly normal.
 
Old 02-09-2012, 06:40 PM   #4
sureshpanchanathan
LQ Newbie
 
Registered: Jan 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
HI,

As I am new to Linux I am learning through this machine. So can I modify as follows:

127.0.0.1 localhost.localdomain

instead of

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

is this is okay?

Thanks

Suresh Panchanathan
 
Old 02-09-2012, 07:24 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
No, if that's what the install setup, leave it alone ...
 
Old 02-09-2012, 08:07 PM   #6
eeekster
Member
 
Registered: Sep 2011
Posts: 163

Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
No, if that's what the install setup, leave it alone ...
There's nothing wrong with adding entries to /etc/hosts. That's what it's there for. But leave the localhost lines.
 
Old 02-09-2012, 08:10 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,360
Blog Entries: 16

Rep: Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146
Here's from my hosts:

Quote:
127.0.0.1 localhost
127.0.1.1 tuna.[localdomain].org tuna.[localdomain].org
For some fool reason, I name all my computers after sea creatures.
 
  


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
Mail from root@localhost.localdomain thru relay=localhost.localdomain[216.24.138.1] rshartog Linux - Server 2 02-02-2009 10:35 PM
MySQL: Why are there two roots localhost, and localhost.localdomain? paulsiu Linux - Server 6 04-18-2007 09:43 AM
localhost.localdomain RJEmery Linux - Newbie 21 05-30-2005 03:59 PM
localhost.localdomain d1ny3 Mandriva 2 04-17-2004 08:27 PM
localhost.localdomain??? neozero62 Linux - Newbie 2 10-31-2003 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration