CentOS固定IP
vi /etc/sysconfig/network-scripts/ifcfg-eth0
NAME="eth0"
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.2.132
PREFIX=24
GATEWAY=192.168.0.2
DNS1=114.114.114.114
systemctl restart network
vi /etc/sysconfig/network-scripts/ifcfg-eth0
NAME="eth0"
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.2.132
PREFIX=24
GATEWAY=192.168.0.2
DNS1=114.114.114.114
systemctl restart network