[CentOS] More on Re: Really changing the hostname

Les Mikesell lesmikesell at gmail.com
Fri Feb 15 18:12:38 UTC 2013


On Fri, Feb 15, 2013 at 12:04 PM, Robert Moskowitz <rgm at htt-consult.com> wrote:
>
>>> I goofed again after a rebuild from a kickstart so had to rename yet
>>> again, see below:
>>>
>>> On 02/14/2013 01:13 PM, Digimer wrote:
>>>>
>>>> On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
>>>>>
>>>>> I need to change the host name on a test server, and in the past when I
>>>>> used hostname to change the hostname, it did not seem to change it
>>>>> everywhere.
>>>>>
>>>>> I really don't want to do a rebuild just yet, but I have to feel
>>>>> confident that hostname is really changed (reboot is not too much of an
>>>>> issue).
>>>>>
>>>>> What is the recommened practice?  Other than get it right the first
>>>>> time.
>>>>
>>>> To make the change permanent, edit /etc/ssyconfig/network and set the
>>>> desired hostname after HOSTNAME=.
>>>>
>>> I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0
>>> was not changed. NetworkManager does not seem to have a dialog for
>>> changing it there.  I manually edited the file.  When I saved the file,
>>> NM seems to have noticed the change and auto-restarted the interface.
>>
>> If you aren't moving this box around onto different networks all the
>> time just get rid of NetworkManager so it will stop screwing up your
>> settings.
>
> That will take me back a few years in what I am doing! What do I gain with
> this?
>
> Do I just erase NetworkManager for this?
>
> In kickstart do I specify to exclude it (-NetworkManager)
>
> I go back to 'service network restart'?

NetworkManager is handy for a laptop where you want to deal with
different wifi settings and moving around among dhcp networks, but for
servers you probably don't want it to overwrite your static configs
and /etc/resolv.conf, etc.   I've usually let it install but then
service NetworkManger stop
chkconfig NetworkManager off
to keep it from running when I set static configs.  I'm not sure what
happens if you don't install it at all - that would probably be even
better.

-- 
   Les Mikesell
     lesmikesell at gmail.com



More information about the CentOS mailing list