1、設置DNS地址
編輯vim /etc/resolv.conf 文件。
增加DNS地址:nameserver ip。
2、清理DNS緩存
清理dns緩存:
通過重啟nscd服務來達到清理dns緩存的目的

如果沒有nscd服務,先用yum安裝:
yum install nscd -y