Solved

Linux, hostname

Posted on 2013-12-19
3
338 Views
Last Modified: 2013-12-19
I am using RHEL 6.5

Recently I tried to chang emy hostname from xxclnt10 to xxclnt12x

From a command prompt, I go to

setup->network Configuration->DNS Configuration

                      âââââââ⤠DNS configuration ââââââââ
                      â                                 â
                      â                                 â
                      â Hostname        xxclnt12x______ â
                      â Primary DNS     x.x.x.x_____ â
                      â Secondary DNS   x.x.x.x_____ â
                      â Tertiary DNS    _______________ â
                      â DNS search path xxx.com_ â
                      â                                 â
                      â    ââââââ        ââââââââââ     â
                      â    â Ok â        â Cancel â     â
                      â    ââââââ        ââââââââââ     â
                      â                                 â
                      â                                 â
                      âââââââââââââââââââââââââââââââââââ


I save the entry and exit

I go back to make sure the hostname is set properly and it is

I do the following:

[root@xxclnt10 ~]# hostname
xxclnt10
[root@xxclnt10 ~]# service network restart
Shutting down interface eth3:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth3:  Determining if ip address 10.14.1.246 is already in use for device eth3...
                                                           [  OK  ]
[root@xxclnt10 ~]# hostname
xxclnt10
[root@xxclnt10 ~]#

Open in new window


I can ping in and out without problems, but I can not change the host name

1> Why is it doing this

2> How can I fix it

Thanks
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
mcj2006 earned 500 total points
ID: 39730590
Try this
Hostname xxclnt12x

cat /etc/hosts 
change the line 127.0.0.1  xxclnt10 localhost.localdomain localhost
to                      127.0.0.1  xxclnt12x localhost.localdomain localhost

cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=xxclnt12x

service network restart

Open in new window

0
 

Author Comment

by:Los Angeles1
ID: 39730615
That actually did not work after the service network restart.

Had to reboot the machine, and then it worked.  Strange
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39730766
Don't add your hostname to the 127.0.0.1 entry! Never!

The network hostname must have its own unique IP in /etc/hosts!

And don't confuse the network hostname and the OS hostname.

The OS hostname is set via /etc/init.d/boot.localnet or /etc/init.d/rc.inet1 (by reading e.g. /etc/HOSTNAME or /etc/hostname, depending on the OS, and issuing the "hostname" command), while the network hostname(s) is/are the names associated with the IP address(es) of the machine's network interface(s) in /etc/hosts.

What worked regarding the above issue is rebooting, not messing around with /etc/hosts.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question