- 查看网卡配置
1ip a
- 修改或添加 DNS 服务器
1vim /etc/sysconfig/network-scripts/ifcfg-eth0
1# 添加规则
2DNS1=114.114.114.114
3DNS2=8.8.8.8
- 重启网络使配置生效
1service network restart
1ip a
1vim /etc/sysconfig/network-scripts/ifcfg-eth0
1# 添加规则
2DNS1=114.114.114.114
3DNS2=8.8.8.8
1service network restart