配置LINUX静态IP

1.修改文件/etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=“dhcp"改为"static”
添加ONBOOT=“yes”
IPADDR=192.168.116.11
NETMASK=255.255.255.0
DNS1=210.32.32.1
GATEWAY=192.168.116.2
HWADDR=00:0c:29:4b:65:26

2.重启网卡 #systemctl restart network

3.报错解决 #systemctl stop NetworkManager
#systemctl disable NetworkManager

你可能感兴趣的:(配置LINUX静态IP)