Bug 994654

Summary: anaconda not create usable /etc/hostname for httpd server on local network
Product: [Fedora] Fedora Reporter: Marian <corcodel.marian>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: anaconda-maint-list, dshea, g.kaviyarasu, jonathan, mkolman, sbueno, stephent98, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 18:00:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marian 2013-08-07 17:36:07 UTC
Description of problem:
After install cat /etc/hostname is the form "local_ip.domainname" useless for
httpd(apache) server

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
cat /etc/hostname 
127.0.0.1         localhost  #usable for httpd(apache server) on local network

Additional info:

Comment 1 David Shea 2013-08-07 18:00:19 UTC
From "man 5 hostname"

The /etc/hostname file configures the name of the local system that is set during boot, with the sethostname(2) system call. It should contain a single newline-terminated host name string.


Your hostname file contains a hostname, and that is correct. /etc/hosts contains address to name mappings, and should include a line similar to:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

Comment 2 Steve Tyler 2013-08-07 20:12:47 UTC
(In reply to Marian from comment #0)
...
> Expected results:
> cat /etc/hostname 
> 127.0.0.1         localhost  #usable for httpd(apache server) on local
> network
...

As David noted, that is not the syntax for /etc/hostname.

Did you mean this?
$ cat /etc/hosts
127.0.0.1		localhost.localdomain localhost
::1		localhost6.localdomain6 localhost6

BTW, on Fedora now, the recommended command for managing host names is:
$ hostnamectl
$ man hostnamectl

Comment 3 Steve Tyler 2013-08-07 20:22:11 UTC
(In reply to Marian from comment #0)
> Description of problem:
> After install cat /etc/hostname is the form "local_ip.domainname" useless for
> httpd(apache) server
...

Were expecting the installer to configure /etc/hosts?

Comment 4 Steve Tyler 2013-08-07 20:31:09 UTC
See also:
$ man hosts
http://man7.org/linux/man-pages/man5/hosts.5.html