更換CentOS7的下載源為阿里雲


一、安裝epel安裝

epel是個好東西,不過國外的速度實在是不能忍受。所以 有了這篇文章。

1、 首先卸載以前裝的epel以免影響

rpm -e epel-release

2、 下載阿里提供的epel

wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

3、yum clean all

4、yum makecache

好了,現在你要裝epel源的軟件的時候 不再慢吞吞了。

或者直接安裝

rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm 

二、Centos光盤的庫 

1、備份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

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

CentOS 6

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

CentOS 7

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

3、之后運行yum makecache生成緩存

參考:

http://mirrors.aliyun.com/help/centos


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM