2

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

Joshua Enfield
  • 3,404
  • 8
  • 41
  • 58

2 Answers2

5

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.

PowerSp00n
  • 1,506
  • 1
  • 8
  • 8
0

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

moshen
  • 1,534
  • 1
  • 9
  • 13