天天看點

Centos7安裝阿裡雲鏡像源

下載下傳阿裡雲提供的 repo 檔案到原始目錄。

這裡以 CentOS 7 為例。(有兩種方式,CentOS 6 或 8 隻需要更改後邊響應的數字即可。)

$ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

or

$ curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

Step 4

清空緩存檔案,并重新生成緩存檔案。

# 1. 清空緩存

$ yum clean all

繼續閱讀