Centos7 换源 换epel源

aiofo2022-07-23  213

装一套ewomail把中途踩到的坑记录下

首先是换源

先备份

mkdir /etc/yun.bak/
mv /etc/yum.repos.d/* /etc/yun.bak/

更换aliyun的源(其他源测试不太理想)

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

安装epel

yum install -y epel-release

备份epel源

mv /etc/yum.repos.d/epel* /etc/yun.bak/

更换源

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

更新缓存

yum clean all
yum makecache

完成以上操作即可


转载请注明原文地址:https://www.aiofo.com/read-40.html