Solved

hosts file error

Posted on 2000-04-22
4
207 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
  • 2
4 Comments
 
LVL 1

Expert Comment

by:zx9r
Comment Utility
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 25 total points
Comment Utility
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
Comment Utility
Adjusted points from 10 to 25
0
 

Author Comment

by:davidpm
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now