Home  >  Article  >  Operation and Maintenance  >  What should I do if the centos system cannot resolve the domain name?

What should I do if the centos system cannot resolve the domain name?

王林
王林Original
2020-03-21 16:09:424531browse

What should I do if the centos system cannot resolve the domain name?

The solution is as follows:

1. Open the /etc/sysconfig/network-scripts/ifcfg-eth0 configuration file

vim /etc/sysconfig/network-scripts/ifcfg-eth0

(recommended tutorial: centos usage tutorial)

2. Add dns settings

For example:

DNS1=8.8.8.8

Tips: 114.114.114.114 and 8.8.8.8, these two DNS They are all pure, so there is no need to worry about DNS hijacking and other problems caused by ISP operators, and they are all 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.

Finally restart the network card.

service network restart

Recommended related video tutorials: linux video tutorial

The above is the detailed content of What should I do if the centos system cannot resolve the 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