1、vi /etc/sysconfig/network-scripts/ifcfg-eth0
2、
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0BOOTPROTO=noneTYPE=etherHWADDR=00:0C:29:3F:41:F2IPADDR=192.168.1.10NETMASK=255.255.255.0#BROADCAST=192.168.1.255#NETWORK=GATEWAY=192.168.1.1ONBOOT=yesIPV6INIT=noUSERCTL=noPEERDNS=yesDNS1=192.168.1.1DNS2=8.8.8.83、配置完以后重启动服务
service network restart