Centos配置DNS 修改NetworkManager.conf 配置文件

vi /etc/NetworkManager/NetworkManager.conf
#在[main]中添加
dns=no

修改resolv.conf配置文件

vim /etc/resolv.conf
#添加dns
nameserver 114.114.114.114

重启

systemctl restart NetworkManager