CentOS配置阿里云yum源和阿里云epel源

发布时间:2024年01月23日

前言:

阿里云地址

https://developer.aliyun.com/mirror/

一、 备份

cd /etc/yum.repos.d/ && mkdir bak
mv *.repo *repo.rpmnew ./bak/

在这里插入图片描述

二、 配置阿里云yum源

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源

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

在这里插入图片描述

四、测试

yum install -y httpd

在这里插入图片描述

文章来源:https://blog.csdn.net/xtaypyvi123456/article/details/135746448
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。