文章目錄
- 一、現象
- 二、解決
一、現象
- 配置在線源時,第一步將在線 YUM 源組態檔下載到本地我就卡住了,如下所示:
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
--2021-02-24 19:25:34-- https://mirrors.aliyun.com/repo/Centos-7.repo
正在決議主機 mirrors.aliyun.com (mirrors.aliyun.com)... 失敗:未知的名稱或服務,
wget: 無法決議主機地址 “mirrors.aliyun.com”
- 納悶了,而后我嘗試 ping 測驗下網路,也是無法成功
[root@localhost ~]# ping www.baidu.com
ping: www.baidu.com: 未知的名稱或服務
二、解決
- 我當時腦袋抽了,想了有一會兒,這就是網路的問題
- 原來是這樣的,我之前在做 Squid 的構建透明代理服務器實驗的時候,在網卡組態檔中注釋掉了網關(GATEWAY),在這里,本機就相當于網卡服務器
- 再把注釋去掉,重啟下網卡,就恢復正常了

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
[root@localhost ~]# service network restart
Restarting network (via systemctl): [ 確定 ]
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
--2021-02-24 19:36:55-- https://mirrors.aliyun.com/repo/Centos-7.repo
正在決議主機 mirrors.aliyun.com (mirrors.aliyun.com)... 58.216.16.43, 61.155.221.223, 222.186.18.242, ...
正在連接 mirrors.aliyun.com (mirrors.aliyun.com)|58.216.16.43|:443... 已連接,
已發出 HTTP 請求,正在等待回應... 200 OK
長度:2523 (2.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”
100%[=============================================>] 2,523 --.-K/s 用時 0s
2021-02-24 19:36:56 (90.8 MB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2523/2523])
- 低級錯誤,低級錯誤,臉紅ing
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/263734.html
標籤:其他
上一篇:jmeter windows/linux版安裝及基本使用
下一篇:MySQL主從復制與讀寫分離
