[root@bigdata111 ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO="static" #这行原来是是dhcp,改掉
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=dfe0b7c4-0b9a-4070-84f6-1dd44c8428c0
DEVICE=ens33
ONBOOT=yes #这个要是yes
PREFIX=24
IPV6_PRIVACY=no
IPADDR=192.168.146.134 #自己想要设置的IP
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=8.8.4.4
GATEWAY=192.168.146.2