centos7 wget solution can not resolve the host domain name

Problem Description:

[root @ localhost XXX] # wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz
--2019-10-10 18: 26: 14 - HTTPS: //cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz
Resolving host cdn.openbsd.org (cdn.openbsd.org) ... failed: temporary DNS failure.
wget: Unable to resolve host address "cdn.openbsd.org"

The reason: dns issue, configure dns server.

Solution:

1. Go to /etc/resolv.conf

2. Modify or add content:

nameserver 8.8.8.8

result:

[root @ localhost XXX] # wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz
--2019-10-10 18: 27: 55 - HTTPS: //cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz
Resolving host cdn.openbsd.org (cdn.openbsd.org) ... 151.101.2.217, 151.101.66.217 , 151.101.130.217, ...
connecting cdn.openbsd.org (cdn.openbsd.org) | 151.101.2.217 |: 443 ... connected.
HTTP request has been issued, awaiting response ... 200 OK
length: 1597697 (1.5M) [application / octet-stream]
is saved to: "openssh-8.0p1.tar.gz"

100% [=============================================== ================================================== =======================>] 1,597,697 12.2KB / s when using 2m 18s

 

Reference Links: https://blog.csdn.net/cs23405/article/details/82017258

Guess you like

Origin www.cnblogs.com/phw110/p/11646311.html
Recommended