centos安装yum源

1、备份原有的配置文件

cd /etc/yum.repos.d

2、下载阿里云源文件

wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、下载epel源

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

4、 清理缓存

yum clean all  

总结:不同版本系统下载相应的文件即可,这里只给出centos7的安装方法,其他操作步骤一样,下载源文件和epel源不一样而已。

猜你喜欢

转载自blog.csdn.net/iris_csdn/article/details/80693388
今日推荐