一、安裝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