HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free and registered users see less advertising! If you just want to browse through the existing questions, just select the forum that you want to visit from the selection below. Otherwise, click here to register!. We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Hybrid View

Hostname

I have a problem with RedHat 7.2 with setting my hostname properly. As root I run hostname &lt;name of box&gt; it sticks till I reboot. After that it goes back to dhcppc1. Anybody know what I am missing?

Re: Hostname

Re: Hostname

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 &lt;name&gt; into /etc/rc.d/rc.local

Re: Hostname

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 &lt;name&gt; 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.

Re: Hostname

Do you have a network card with a static IP? I've seen lots of systems be listed as &quot;localhost&quot; 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 &quot;localhost&quot;.

Re: Hostname

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.

Re: Hostname

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.