1,修改IP地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=F0:DE:F1:73:61:0F
TYPE=Ethernet
UUID=683ae70d-037f-45ce-9712-6fa9294d7a7b
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.0.130
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=211.98.2.4
DNS2=114.114.114.114
ARPCHECK=no
DEVICE=eth0
HWADDR= MAC地址
ONBOOT=yes
BOOTPROTO=static
IPADDR=ip地址
NETMASK=子网掩码
GATEWAY=网关地址
2,修改网关
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=
GATEWAY=网关地址
3,修改DNS
vi /etc/resolv.conf
nameserver网关地址
4,重启网络服务
service network restart