[102038] in RedHat Linux List
Re: Hostname
daemon@ATHENA.MIT.EDU (Jan Carlson)
Tue Dec 1 02:53:54 1998
Date: Tue, 01 Dec 1998 02:38:50 -0500
From: Jan Carlson <janc@iname.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Priyadi Iman Nurcahyo wrote:
> On Mon, Nov 30, 1998 at 10:17:42PM -0400, Michael Butler wrote:
> > Hello All,
> > I want to change my hostname, which I can do. My problem is that I am running
> > a database product that relies on the use of my old hostname to connect to my
> > databases.
> >
> > My previous hostname was localhost.localdomain and I've successfully changed
> > the name to euclid.net. Is there a way that I can have localhost.localdomain
> > recognized as well so that I can connect to the database?
>
> if you're lucky, you can just replace every occurence of 'localhost.localdomain'
> in your filesystem to 'euclid.net' (and maybe the corresponding ip address as well)
> it did the trick when i move my development machine into production...
Does ifconfig still show the "lo" interface is working?
Why not fix the binaries that want "localhost" too?
>
>
> #!/bin/sh
> for A in `find / -type f`
> do
> if ((grep "localhost\.localdomain" $A > /dev/null) && (file $A | grep "ASCII" > /dev/null))
> then
> echo $A
> sed s/localhost\.localdomain/eudlid.net/g < $A > $A.tmp2
> mv $A $A.tmp
> mv $A.tmp2 $A
> fi
> done
>
> the above script should replace every 'localhost.localdomain' in every text file
> in your filesystem to 'euclid.net'...
>
> as usual, don't forget to backup first...
>
> --
> PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com http://archive.redhat.com
> To unsubscribe: mail redhat-list-request@redhat.com with
> "unsubscribe" as the Subject.
--
Jan Carlson
janc@iname.com Scarborough, Ontario, Canada
Mailed with Netscape 4.5 on Red Hat Linux 5.2
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.