centos7 配置dns

1、修改网卡信息

#取消NetworkManager管理
NM_CONTROLLED=no

2、重启网络服务

systemctl restart network

3.配置DNS

3.1修改NetworkManager.conf 配置文件

vim /etc/NetworkManager/NetworkManager.conf

在[main]中添加

dns=no

3.2修改resolv.conf配置文件

vim /etc/resolv.conf

添加

#主DNS服务器
nameserver 223.5.5.5   <----阿里dns
 
#备DNS服务器
nameserver 114.114.114.114

4重启NetworkManager

systemctl restart NetworkManager

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2021-09-07
  • 2021-08-10
  • 2021-09-19
  • 2022-12-23
  • 2021-08-01
  • 2021-08-19
猜你喜欢
  • 2021-11-12
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2021-03-29
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案