SCIENTIFIC-LINUX-USERS Archives

March 2016

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Loris Bennett <[log in to unmask]>
Reply To:
Loris Bennett <[log in to unmask]>
Date:
Wed, 16 Mar 2016 13:53:33 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
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.

> On SL7, libnss_myhostname does the job of the second "/etc/hosts" line
> (but with 127.0.0.2) automatically.
>
> To the OP:
>
> Where are you setting the domainname?

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.141.235.253
NETMASK=255.255.0.0
DOMAIN=test.cluster
USERCTL=no

Cheers,

Loris

-- 
This signature is currently under construction.

ATOM RSS1 RSS2