Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change ip address of a linux box 3

Status
Not open for further replies.

gchen

Programmer
Nov 14, 2002
174
US
the ip address i have for my linux box needs to be updated and i am not sure i have all the tips for it.

i think i ought to updated my /etc/hosts
and
/etc/httpd/conf/httpd.conf for the apache server.

anything else i need to change on my linux server?

thanks a lot!

gary
 
You can use the "ifconfig" command to make a temporary change, or you can modify the network configuration settings.

For instance on Redhat/Fedora/CentOS distributions, there are files in /etc/sysconfig/network/ such as eth0cfg or something like that. In these config files (one per physical NIC, generally) you specify the IP that should be assigned statically (or to just use DHCP for dynamic assignment).

The config files take affect after a reboot OR after you restart the network service (which is more consistent with linux administrative norms).

HTH,
D.

D.E.R. Management - IT Project Management Consulting
 
hi D,

Thanks for the info. Will that be all i need?

- /etc/sysconfig/network
- /etc/hosts
- /etc/httpd/conf/httpd.conf

just want to make sure before actually making the change. i am remote to my server and i have experienced with incorrect change and can no longer telnet to it... which requires onsite console login. just try to avoid that... thanks!
 
are you using fedora?

/etc/sysconfig/network-scripts/ifcfg-eth0 (eth1 and so on if you have more than 1 ethernet port) to modify IP Addresses

/etc/sysconfig/network (to modify defaukt gateway)
/etc/resolv.conf (if you need to change DNS and domain name)

/etc/hosts (only uf you have more than one host name)
/etc/httpd/conf/httpd.conf (only if apache is configured with IP rather than hostname)

Cheers.

Chacal, Inc.[wavey]
 
oh! BTW, in order to make the changes online issue:

/etc/init.d/network restart

Cheers.

Chacal, Inc.[wavey]
 
Thank much Gurus!!!!!!!

Problem resolved and you folks rock!!!!!
 
just for ref you can use netconfig from a shell prompt this will apply everything needed to your local interface , but still amanual job for your services httpd squid etc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top