情景:
在操作系统cetos5.6上面安装数据库,需要下载补丁,结果运行yum的命令的时候报错了
[root@ekptest001 ~]# yum install elfutils-libelf*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
处理方法:
1、检查该机器的外网情况,外网完全打开的;
2、检查cat /etc/resolv.conf dns设置没有问题
[root@ekptest001 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.31.101
nameserver 8.8.8.8
3、关闭防火墙
service iptables stop
[root@ekptest001 ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
总结:最后关闭防火墙后,终于可以下载补丁了;
运行:nslookup mirrorlist.centos.org
Server: 192.168.31.101
Address: 192.168.31.101#53
Non-authoritative answer:
Name: mirrorlist.centos.org
Address: 69.30.193.218
Name: mirrorlist.centos.org
Address: 72.232.223.58
Name: mirrorlist.centos.org
Address: 204.15.73.243
Name: mirrorlist.centos.org
Address: 64.235.47.134
可以显示当前已经可以连接;
--------------------------------------------------------------------------------------------------
IT技术员的理想发展曲线:技术员——技术管理——运营管理——企业战略
个人理念:不做单纯的技术,技术就做管理的技术
ORACLE技术管理QQ群:367875324
-------------------------------------------------------------------------------------------------