Home  >  Article  >  Operation and Maintenance  >  centos cannot resolve domain name

centos cannot resolve domain name

王林
王林Original
2020-03-18 16:27:564317browse

centos cannot resolve domain name

The solution is as follows:

First, add the dns settings at the end in /etc/sysconfig/network-scripts/ifcfg-eth0.

For example: DNS1=8.8.8.8

(Recommended tutorial: centos usage tutorial)

114.114.114.114 and 8.8.8.8, these two DNS is very pure, so there is no need to worry about DNS hijacking caused by ISP operators, and it is provided to users for free.

114.114.114.114 is the DNS commonly used by China Mobile, China Telecom and China Unicom.

8.8.8.8 is the DNS provided by GOOGLE, and this address is universal.

Then, restart the network card:

service network restart

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of centos cannot resolve domain name. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn