vim ifcfg-ens33
// 做以下操作:
// 修改:
BOOTPROTO=static
ONBOOT=yes
// 增加:
IPADDR=192.168.110.155
GATEWAY=192.168.110.2 -- 网关
DNS1=192.168.110.2 --与网关一致
// 重启服务
service network restart
ifconfig
ping www.baidu.com -c 3
原文:https://www.cnblogs.com/vaen/p/15013570.html