Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Background information: I have a problem installing system-config-network. It appears it cannot find an update to sqlite (checks every mirror and comes back empty handed.) I have tried the skipping broken option and package cleanups from yum-utils.

Since I cannot get it installed, I decided to set an ip manually from console. A quick Google search comes back empty handed as for an easy how-to guide that works. What do I need to do for a currently configured DHCP ip to change it to a Static IP from console.

Thanks, Josh

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Edit the /etc/sysconfig/network-scripts/ifcfg-eth[num] file like this:

DEVICE=eth0
BOOTPROTO=none
HWADDR=<your MAC>
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=<ip>
GATEWAY=<gateway>

When you are done run /etc/init.d/network restart.

share|improve this answer

Look at the config files in /etc: /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-ethx

http://www.centos.org/docs/5/html/5.1/Deployment_Guide/ch-networkscripts.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.