CentOS配置阿里云yum源和阿里云epel源
前言:
阿里云地址
bash
https://developer.aliyun.com/mirror/
一、 备份
bash
cd /etc/yum.repos.d/ && mkdir bak
mv *.repo *repo.rpmnew ./bak/

二、 配置阿里云yum源
bash
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#进入目录
cd /etc/yum.repos.d/
wget https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache

三、 配置阿里云epel源
bash
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
#或者
cd /etc/yum.repos.d/
wget https://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

四、测试
bash
yum install -y httpd
