1834646 Members
2069 Online
110069 Solutions
New Discussion

hostname

 
andi_1
Frequent Advisor

hostname

hi guys,

I have problem starting Apache StrongHold webserver and here is why:
[Tue Aug 27 08:28:57 2002] [alert] mod_unique_id: unable to gethostbyname("fcauth08")
[Tue Aug 27 10:57:49 2002] [alert] mod_unique_id: unable to gethostbyname("fcauth08")
[Tue Aug 27 11:18:52 2002] [alert] mod_unique_id: unable to gethostbyname("fcauth08")

When I type
#hostname
I get fcauth08 as a hostname.

When I do nslookup for fcauth08, DNS server cannot find corresponding IP, if I type fc-auth-08, nslookup works.

How can I change hostname to be fc-auth-08 instead fcauth08.

I added fc-auth-08 to /etc/hosts file

Thank you for your help!
5 REPLIES 5
Kurt Beyers.
Honored Contributor

Re: hostname

Just type:

hostname fc-auth-08

Kurt
Sajid_1
Honored Contributor

Re: hostname

TO change hostname:
# set_parms
# sam

You can also change it with editing /etc/rc.config.d/netconf file.
learn unix ..
keith persons
Valued Contributor

Re: hostname

Andi,

If you want to change the hostname permanently you can run /etc/set_parms hostname and you should be prompted for the new hostname & probably a reboot.

Or, you could just add the fsauth08 alias to the fc-auth-08 hosts entry and make sure the /etc/nsswitch.conf has files first for the hosts entry.

keith
steven Burgess_2
Honored Contributor

Re: hostname

Hi andi

Use

set_parms hostname

HTH

Steve
take your time and think things through
Rich Wright
Trusted Contributor

Re: hostname

We have a similar setup.
Your /etc/resolv.conf should look something like this..
domain domain.com
nameserver xx.xx.xx.98

And your /etc/nsswitch.conf should look something like this..
hosts: files [NOTFOUND=continue TRYAGAIN=continue UNAVAILABLE=continue] dns

The /etc/hosts entry should be.

xx.xx.xx.xx fcauth08 fc-auth-08 (possibly also fc-auth-08.domain.com).

Rich