在命令行输入下面这个命令
vim /etc/sysconfig/network-scripts/ifcfg-eth0
设置完成后保存,然后重新启动网络服务
service network restart