FreezeJ' Blog

Centos更换yum源

2020-05-19

阿里云

Centos7

cd /etc/yum.repos.d
mkdir -p tmp
mv CentOS* tmp/
curl -O http://mirrors.aliyun.com/repo/Centos-7.repo

# 安装EPEL
yum -y install epel-release
curl -O http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all && yum makecache

Centos6

cd /etc/yum.repos.d
mkdir -p tmp
mv CentOS* tmp/
curl -O http://mirrors.aliyun.com/repo/Centos-6.repo

# 安装EPEL
yum -y install epel-release
curl -O http://mirrors.aliyun.com/repo/epel-6.repo
yum clean all && yum makecache

腾讯云

官方repo地址:https://mirrors.cloud.tencent.com/repo/
原理同上,替换对应系统版本的repo文件即可

Tags: Linux