linux配置国内yum源
配置国内的yum源
1.在/etc/yum.repos.d/目录底下,定制我们自己的repo仓库文件
2.我们自己没有yum仓库,我们就去拿阿里巴巴的yum仓库
3.https://opsx.alibaba.com/mirror 这就是阿里巴巴的镜像站
4.下载阿里巴巴的yum仓库文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget下载文件后,-O参数,指定放到某个目录,且改名
5.清除yum缓存
yum clean all
6.生成新的阿里云的yum软件缓存
yum makecache
再配置epel额外的仓库源,这个仓库里就存放了很多第三方软件,例如redis mysql nginx
1.配置epel仓库
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2.最好再生成yum缓存
yum makecache

浙公网安备 33010602011771号