Subject: | |
From: | |
Reply To: | |
Date: | Wed, 16 Mar 2016 15:24:04 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Tom H <[log in to unmask]> writes:
> On Wed, Mar 16, 2016 at 1:53 PM, Loris Bennett
> <[log in to unmask]> wrote:
>> Tom H <[log in to unmask]> writes:
>>> On Tue, Mar 15, 2016 at 1:42 PM, Nico Kadel-Garcia <[log in to unmask]> wrote:
>>>> On Tue, Mar 15, 2016 at 8:32 AM, Nico Kadel-Garcia <[log in to unmask]> wrote:
>>>>
>>>>> The problem is that the $HOSTNAME for the system isn't published in
>>>>> DNS, nor is it the first hostname for a line in /etc/hosts, so the
>>>>> "hostname --fqdn" is not finding it associated with your IP addresses.
>>>>> The usual approach for portable laptops is to put a line like this in
>>>>> /etc/hosts somewhere.
>>>>>
>>>>> 127.0.0.1 mymachine.mydomain
>>>
>>> On SL6, I've adopted the Debian approach:
>>>
>>> # cat /etc/hosts
>>> 127.0.0.1 localhost
>>> 127.0.1.1 tadmin.test.cluster tadmin
>>>
>>> # cat /etc/sysconfig/network
>>> NETWORKING=yes
>>> HOSTNAME=tadmin
>>>
>>> # hostname
>>> tadmin
>>>
>>> # hostname -s
>>> tadmin
>>>
>>> # hostname -f
>>> tadmin.test.cluster
>>>
>>> # hostname -d
>>> test.cluster
>>
>> This is what my set-up looks like, too.
>
> It can't be because then (1) "/etc/hosts" would differ on tadmin01 and
> tadmin02 and (2) "hostname" on tadmin02 would return "tadmin02".
I meant that my set-up is the same in that I have similar data in those
two files. This is what /etc/hosts looks like:
[root@tadmin01 etc]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
xxx.xxx.xxx.xxx tadmin01.zedat.fu-berlin.de
xxx.xxx.xxx.xxx tadmin02.zedat.fu-berlin.de
10.141.235.254 tadmin01.test.cluster tadmin01
10.141.235.253 tadmin02.test.cluster tadmin02
It is the same on tadmin01 and tadmin02.
And for /etc/sysconfig/network on tadmin01 I have
[root@tadmin01 ~]# cat /etc/sysconfig/network
# Generated from an ansible template
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=tadmin01
GATEWAY=xxx.xxx.xxx.xxx
and on tadmin02
[root@tadmin02 ~]# cat /etc/sysconfig/network
# Generated from an ansible template
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=tadmin02
GATEWAY=xxx.xxx.xxx.xxx
[snip (64 lines)]
I still get
[root@tadmin01 ~]# hostname
tadmin01
and
[root@tadmin02 ~]# hostname
tadmin02.test.cluster
Cheers,
Loris
--
This signature is currently under construction.
|
|
|