How to configure dns domain name resolution in centos

王林
Release: 2020-03-17 15:30:54
Original
11981 people have browsed it

How to configure dns domain name resolution in centos

Step 1: Use Alibaba Cloud's yum source to install the software on Centos. If an error message appears as shown in the figure, it is found that the domain name cannot be resolved. The same is true for manually testing the Baidu domain name. Check the domain name configuration and find that Linux There is no DNS resolution configured on

How to configure dns domain name resolution in centos

How to configure dns domain name resolution in centos

Step 2: The methods of setting DNS under CentOS 7 and CentOS 6 are different, use a new command line Tool nmcli to set up

nmcli connection show------Display the current network connection

(Recommended tutorial: centos usage tutorial)

How to configure dns domain name resolution in centos

Step 3: Modify the DNS server corresponding to the current network connection. The network connection here can be identified by name or UUID (eth0 is the external network card)

nmcli con mod eth0 ipv4.dns "114.114.114.114 8.8.8.8"

How to configure dns domain name resolution in centos

Step 4: nmcli con up eth0---------Enable dns configuration to take effect

View The /etc/resolv.conf configuration has also been updated

How to configure dns domain name resolution in centos

Step 5: Use the www.baidu.com domain name to test and find that it has been parsed normally and the software has been installed successfully

How to configure dns domain name resolution in centos

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to configure dns domain name resolution in centos. 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