代码拉取完成,页面将自动刷新
一般是下载 .repo 源即可,但有时候我们需要安装一些额外的包,就需要下载 Extra Packages for Enterprise Linux (EPEL) 源, 比如我们需要用 yum 安装 ansible ,就需要安装 epel 。
1.安装 repo 源。
repo 源一般包括 base, updates, Extras 三部分。
$ cd /etc/yum.repos.d/
$ wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
如果还有其他源,可以暂且把他们重命名成其他扩展名,比如 centos-base.repo.bak
$ mv CentOS7-Base-163.repo CentOS7-Base.repo
$ yum clean all
$ yum makecache
2.安装 epel 源。
$ yum install epel-release
$ yum makecache
3.检查是否安装成功
$ yum repolist
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。