通过ifconfig,可以看到网卡的配置文件为ens33,位置是/etc/sysconfig/network-scripts/ifcfg-ens33,
bootproto的参数值有none(禁止dhcp),static(静态IP),dhcp(自动获取),如果要设置固定ip,选择static,并配置
然后:wq保存退出,并reboot命令重启服务。
通过ifconfig,可以看到网卡的配置文件为ens33,位置是/etc/sysconfig/network-scripts/ifcfg-ens33,
bootproto的参数值有none(禁止dhcp),static(静态IP),dhcp(自动获取),如果要设置固定ip,选择static,并配置
然后:wq保存退出,并reboot命令重启服务。