?
Solved

hosts file error

Posted on 2000-04-22
4
Medium Priority
?
220 Views
Last Modified: 2013-12-06
If I do a fresh install of RH 6.1 the hosts file ends up being one line that looks like this:
127.0.0.1            localhost.localdomain localhost php1@softdesigns.com

I have to edit it to look like this:
127.0.0.1            localhost.localdomain localhost
192.168.1.10            php1@softdesigns.com php1

I entered the 192.168.1.10 address during the install process. I entered php1@softdesigns.com as the host name during the install process.
What could I have done wrong during the install that would make rh 6.1 create an invalid hosts file. Or is the one line host file valid in some sence of the word.
Is this a bug or a normal administration chore?

0
Comment
Question by:davidpm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:zx9r
ID: 2740514
the problem is in the character @

if the domain name is softdesigns.com then the host name would be php1.softdesigns.com and not php1@softdesigns.com

Anyway the installation program would must check this error... perhaps in future versions ?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 2740879
As zx9r pointed out the @ sign can't be there. Redhat's installation is at odds with their own reference manual and at odds with standard Unix conventions.

According to the "Official Red Hat Linux Reference Guide" pp109-111, the linuxconf settings should have localhost.localdomain and the FQDN for the system separately defined. When done this way the hosts file will contain:

127.0.0.1      localhost.localdomain
111.222.333.444 name.dom.com

You'd normally add aliases of localhost and name to the respective lines, just to make life a bit simpler. That section is very specific about leaving localhost.localdomain defined.

For some bizare reason the OS installer does it the way you've noticed. And that tends to break things that need the IP of the local box. So Ijust let install do its thing and when it's finished I do my thing and make the hosts file look like it should.
0
 

Author Comment

by:davidpm
ID: 2741373
Adjusted points from 10 to 25
0
 

Author Comment

by:davidpm
ID: 2741374
I'll to to cs to ask zx9r to get his points to as he was first. jevie is and has been working on several major projects and has the most complete answer
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question