su -切换到root权限
vi /etc/sysconfig/network-scripts/ifcfg-eth0 (cat /etc/sysconfig/network-scripts/ifcfg-eth0 这条命令是查看)
DEVICE=eth0
HWADDR=00:0C:29:2E:36:16
UUID=XXXXXXX
TYPE=Ethernet
ONBOOT=”yes“
MM_CONTROLLED=”yes“
BOOTPROTO=”static“
IPV6INIT=”no“
USERCTL=”no“
IPADDR=192.168.0.117
NETMASK=255.255.255.0
service network restart