I always set mine in /etc/hosts but I use static IP... dunno if that helps !
I have a problem with RedHat 7.2 with setting my hostname properly. As root I run hostname <name of box> it sticks till I reboot. After that it goes back to dhcppc1. Anybody know what I am missing?
I always set mine in /etc/hosts but I use static IP... dunno if that helps !
look also for a file /etc/HOSTNAME (slackware) , maybe its the same in redhat .. else look at your init scripts it gets set there somewhere.
And it should work if you put something like : /bin/hostname <name> into /etc/rc.d/rc.local
Thanks, but there is no specific file. I was thinking the init scripts are where I ned to fix it, but I figured somebody gaffed the same way I have been. Odd though how slack just happens to work all the time ..... god I miss those days.look also for a file */etc/HOSTNAME (slackware) *, maybe its the same in redhat .. else look at your init scripts it gets set there somewhere.
And it should work if you put something like : /bin/hostname <name> into /etc/rc.d/rc.local
Ill give it a whirl and let y'all know where my goofup was.
Thanks
Do you have a network card with a static IP? I've seen lots of systems be listed as "localhost" because that's the only entry in /etc/hosts file. Removing that, or setting it to something different causes problems across many apps, that need a connection to "localhost".
no its dynamic from my netgear router. Although the lease time is so long that I have never changed ips.
i didnt get a chance last evening to try editing a few files to see the result. I hopefully will this evening.
Try grepping your rc.* files for HOSTNAME or hostname - it should find the command that is setting it, so you can "fix" it there.
Maybe try looking in /etc/rc.d/rc.sysinit and confirm that a line like HOSTNAME='/bin/hostname' exists. Then open /etc/sysconfig/network and see if HOSTNAME is defined. If not, add a line like HOSTNAME=mybox.domain. Also check for NETWORKING=yes and GATEWAY=XXX.XXX.XXX.XXX.
Thats kinda was my plan, but I have been sick lately. I havent touched my box other that to make sure my genome@home is still running okay. But sometime soon I hope to feel well enough after work to dick with my box.
Thanks for all the help!! I should have a fix that works between yours and agars suggestions.
Bookmarks