LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change Host and Ip address Fedora 3 (https://www.linuxquestions.org/questions/linux-newbie-8/change-host-and-ip-address-fedora-3-a-273781/)

s1goldman 01-04-2005 01:23 PM

Change Host and Ip address Fedora 3
 
I need to change my IP and Host name on my system. I changed the IP address and in pings- the hostname did not change - I tried adding a line a line to the /etc/hosts file - ip and hostname-

rebooted -
still the hostname does not reflect the correct host name for the IP address?
Any thoughts

s1goldman 01-04-2005 03:16 PM

This worked for me-

pinged new hostname

access default web page



Edit the hosts file on your system. The hosts file is usually found in


/etc/hosts



Add this entry to the Hosts file:

216.201.182.27 directory.thepalace.com


Now make sure this file is used for host name lookups. This is done in two files. First is:
/etc/host.conf


This file should have at least the line shown below:

order hosts,bind


That has host lookups use the hosts file before doing a DNS query with bind.


The next file is:

/etc/nsswitch.conf


Recent tests indicate that this file is required in order for the pserver to use the entry in /etc/hosts. The nsswitch.conf file should have this line for the hosts configuration:

hosts: files nisplus nis dns


There will probably already be a similar line in your version of this file. Just make sure "files" comes before whatever other methods are listed.

There is no need to reboot your system. Just restart your palace pservers.

Start up your palace.

:) :)

Mikhail_16 01-04-2005 03:33 PM

Hehe, wrong direction. Look in the /etc/sysconfig/network file, then change /etc/hosts :)

almost forgot change some addresses under /etc/sysconfig/network-scripts if you are using static IP on your box. If you are on DHCP just modify hosts.

What you did works, i guess, but its waaay of an overkill.

twantrd 01-04-2005 04:24 PM

Or you can run 'netconfig' to change IP address on redhat.

-twantrd


All times are GMT -5. The time now is 10:51 AM.