1. 程式人生 > >epel源安裝(Centos6.10和Centos7)

epel源安裝(Centos6.10和Centos7)

Centos6.10

rpm -e epel-release                 #首先解除安裝以前裝的epel 以免影響
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo   #下載阿里提供的epel
yum clean all                                                                    #清理快取
yum makecache                                                        #生成快取
rm -rf /etc/yum.repos.d/*                              # 刪除原來的epel源配置
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo # 修改為阿里雲的源

Centos7

rpm -e epel-release               #首先解除安裝以前裝的epel 以免影響
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo    #下載阿里提供的epel
yum clean all                        #清理快取
yum makecache                              #生成快取
rm -rf /etc/yum.repos.d/*              #刪除原來的epel源配置
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo  修改為阿里雲的源