CentOS7 minimal 静态IP

注:主机 ip是 192.168.0.200,ifcfg-enp3s0也可以是ifcfg-eth0

  • 配置
  1. 配置
    vi /etc/sysconfig/network-scripts/ifcfg-enp3s0
NM_CONTROLLED=no
BOOTPROTO=static
ONBOOT=yes

IPADDR=192.168.0.200
PREFIX=24
GATEWAY=192.168.0.1
DNS1=192.168.0.1
  1. 重启
    systemctl restart network

你可能感兴趣的:(CentOS7 minimal 静态IP)