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

王林
Release: 2020-03-21 16:09:42
Original
4630 people have browsed it

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
Copy after login

(recommended tutorial: centos usage tutorial)

2. Add dns settings

For example:

DNS1=8.8.8.8
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template