centos7 configuration dns

centos7 configuration dns

1, modify the network card information

#取消NetworkManager管理
NM_CONTROLLED=no

2, Network Service Restart

systemctl restart network

Configuring DNS

3.1 NetworkManager.conf modify configuration files

vim /etc/NetworkManager/NetworkManager.conf

Add the [main] in

dns=no

3.2 modify the configuration file resolv.conf

vim /etc/resolv.conf

Add to

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

4 restart NetworkManager

systemctl restart NetworkManager

Guess you like

Origin www.cnblogs.com/fb010001/p/12320982.html
Recommended