天天看點

【雲安全中心】Linux 更新軟體-域名解析失敗現象原因修複步驟

現象

http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/python-devel-2.7.5-86.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.           

注:mirrors.cloud.aliyuncs.com 這個域名需要阿裡雲vpc下dns才能解析。

原因

系統内部配置的dns伺服器IP無法解析mirrors.cloud.aliyuncs.com該域名導緻。

或者其他依賴的主機導緻mirrors.cloud.aliyuncs.com無法解析。

修複步驟

注:所有操作修改前,請先備份資料,建立快照等。

登陸伺服器

通過

vnc

或者

Workbench

連接配接登陸到伺服器。

修改配置檔案

cp  /etc/resolv.conf  /etc/resolv.conf.bak
vim  /etc/resolv.conf           

寫入以下内容:

options timeout:1 attempts:1 rotate
nameserver 100.100.2.136
nameserver 100.100.2.138           

驗證測試

dig mirrors.cloud.aliyuncs.com           

驗證測試如圖一能夠解析到IP後,雲安全中心重新進行點選修複漏洞.

繼續閱讀