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
Tags: Linux
使用支付宝打赏
使用微信打赏

若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏