vi /etc/sysconfig/network-scripts/ifcfg-ens33 , 修改为 根据网络自启动网卡

    1. ...
    2. BOOTPROTO=dhcp
    3. ...
    4. ONBOOT=yes

    vi /etc/sysconfig/network, 修改为 启用网络

    1. # Created by anaconda
    2. NETWORKING=yes

    vi /etc/resolv.conf, 编辑文件, 增加域名解析服务器

    1. nameserver 114.114.114.114

    重启网卡

    1. $ systemctl restart network
    1. $ ping www.baidu.com
    2. PING www.a.shifen.com (110.242.68.3) 56(84) bytes of data.

    连接成功