vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0"
BOOTPROTO="static" #静态
HWADDR="00:0C:29:46:B6:84"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes" #开机自启动
TYPE="Ethernet"
UUID="7f48a8b7-e738-4250-9472-e67e36e9e22e"
DNS1=192.168.1.1 #DNS
IPADDR=192.168.1.212 #IP
NETMASK=255.255.255.0 #子网掩码
GATEWAY=192.168.1.1 #网关 service network restart 或 /etc/init.d/network restart