centos7 修改yum源為阿裡源,centos7 修改yum源為阿裡源,某下網絡下速度比較快 首先是到yum源設置文件夾裡。
cd /etc/yum.repos.d
接著備份舊的配置文件
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
下載阿裡源的文件
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
yum clean all
yum makecache