使用ipconfigsetupip命令,也可直接修改/etc/sysconfig/network-scripts/ifcfg-eth0(对于centos7,网卡等设备的命名已不是eth0这种规则了)