[root@node2 ~]# uname -a
Linux node2 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@node2 ~]#
[root@node2 ~]#
[root@node2 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Kernel \r on an \m
[root@node2 ~]#
[root@node2 ~]#
[root@node2 ~]# cd /etc/yum.repos.d
[root@node2 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2021-07-15 07:07:14-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... failed: Temporary failure in name resolution.
wget: unable to resolve host address ?.ublic-yum.oracle.com?
[root@node2 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2021-07-15 07:07:46-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... failed: Temporary failure in name resolution.
wget: unable to resolve host address ?.ublic-yum.oracle.com?
[root@node2 yum.repos.d]#
试了下,外网可以 上,但是下不了public-yum-ol6.repo,单独网页打开http://public-yum.oracle.com/public-yum-ol6.repo可以看到内容
wget: unable to resolve host address ?.ublic-yum.oracle.com?
这里看应该是找不到主机,那就是域名解析问题
编辑文件,保存
[root@node2 yum.repos.d]# vi /etc/resolv.conf
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 8.8.8.8
可以下载了
[root@node2 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2021-07-15 07:10:34-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 23.42.151.167
Connecting to public-yum.oracle.com|23.42.151.167|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12045 (12K) [text/plain]
Saving to: ?.ublic-yum-ol6.repo?
100%[=============================================================================================================================================================>] 12,045 --.-K/s in 0s
2021-07-15 07:10:34 (112 MB/s) - ?.ublic-yum-ol6.repo?.saved [12045/12045]
[root@node2 yum.repos.d]#