Changing the hostname
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Networking > Changing the hostname




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Changing the hostname  
No One


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-12-04 04:35 AM

I have a Linux machine on my local area network.  I have run the
hostname command to change the host and domain name.  I also ran the
domainname command.  All is well till I reboot and it resets to
"localhost.localdomain".  I am running RH 9.  How do I keep the settings
on reboot?  It has a static ip.






[ Post a follow-up to this message ]



    Re: Changing the hostname  
Bit Twister


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-12-04 05:35 AM

On Mon, 12 Apr 2004 03:03:02 GMT, No One wrote:
> I have a Linux machine on my local area network.  I have run the
> hostname command to change the host and domain name.  I also ran the
> domainname command.  All is well till I reboot and it resets to
> "localhost.localdomain".  I am running RH 9.  How do I keep the settings
> on reboot?  It has a static ip.
>

Guessing,
cat /etc/sysconfig/network
HOSTNAME=wb.home.invalid    <============
NETWORKING=yes
GATEWAY=192.168.1.1





[ Post a follow-up to this message ]



    Re: Changing the hostname  
Alexander Dalloz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-12-04 04:44 PM

On Mon, 12 Apr 2004 04:02:49 +0000 Bit Twister wrote:


> cat /etc/sysconfig/network
> HOSTNAME=wb.home.invalid    <============
> NETWORKING=yes
> GATEWAY=192.168.1.1

And a corresponding entry line in /etc/hosts has to be set too.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416  14CD E197 6E88 ED69 5653






[ Post a follow-up to this message ]



    Re: Changing the hostname  
Bill Unruh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-12-04 05:38 PM

No One <noone@yahoo.com> writes:

]I have a Linux machine on my local area network.  I have run the
]hostname command to change the host and domain name.  I also ran the
]domainname command.  All is well till I reboot and it resets to
]"localhost.localdomain".  I am running RH 9.  How do I keep the settings
]on reboot?  It has a static ip.

hostname only changes the running hostname. It does not save it.
/etc/sysconfig/network







[ Post a follow-up to this message ]



    Re: Changing the hostname  
No One


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-13-04 02:40 AM

Alexander Dalloz wrote:

> On Mon, 12 Apr 2004 04:02:49 +0000 Bit Twister wrote:
> 
>
> And a corresponding entry line in /etc/hosts has to be set too.
>

I had already changed the files mentioned.  Apparently the file to
change is /etc/sysconfig/network.






[ Post a follow-up to this message ]



    Re: Changing the hostname  
Tim


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-13-04 05:34 AM

On Mon, 12 Apr 2004 04:02:49 GMT,
Bit Twister <BitTwister@localhost.localdomain> posted:

> HOSTNAME=wb.home.invalid

Some things will refuse to work with ".invalid" domains (like some mail
clients or servers).  If you find some of your services behave that way,
you can try using the ".test" domain name, instead.  (See:  RFC2606.)

Just one of those little "gotchyas" that might come back to haunt you.

Excessive cross-posting has been trimmed a bit.  I cannot post messages
when there's an unavailable group in the newsgroup header, and neither can
many other people.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary).  But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.





[ Post a follow-up to this message ]



    Re: Changing the hostname  
Rick Stuart


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-20-04 05:36 PM

Adding the HOSTNAME parameter to /etc/sysconfig/network is the first
step...If you are using DHCP, and would like to have your other machines
on the network find your linux box by name, you should also edit
/etc/sysconfig/network-scripts/ifcfg-eth0  (assuming your network device
is eth0).

Add the line: DHCP_HOSTNAME=hostname
Where: hostname is the name you want your system to be known as on
the network.

Works for Micro$oft DHCP and for my Dlink DCHP at home.

Bill Unruh wrote:
> No One <noone@yahoo.com> writes:
>
> ]I have a Linux machine on my local area network.  I have run the
> ]hostname command to change the host and domain name.  I also ran the
> ]domainname command.  All is well till I reboot and it resets to
> ]"localhost.localdomain".  I am running RH 9.  How do I keep the settings
> ]on reboot?  It has a static ip.
>
> hostname only changes the running hostname. It does not save it.
> /etc/sysconfig/network
>
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:15 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register