CentOS7配置阿里云yum源和EPEL源(二)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CentOS7配置阿里云yum源和EPEL源(二),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3452字,纯文字阅读大概需要5分钟。
内容图文
安装wget
原生CentOS7没有wget工具,而后续要下载阿里云的源,所以我们要先安装wget.
[root@DW1 ~]# cd /etc/yum.repos.d/
[root@DW1 yum.repos.d]# yum -y install wget
备份系统原生的yum源
有些博客没有注意与前一步的顺序,如果我们先备份源,就会因为没有yum源而无法安装wget.
[root@DW1 yum.repos.d]# mkdir repo_bak
[root@DW1 yum.repos.d]# mv *.repo repo_bak/
[root@DW1 yum.repos.d]# ls
repo_bak
下载阿里云yum源
下载CentOS-Base.repo到/etc/yum.repos.d/路径下:
[root@DW1 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@DW1 yum.repos.d]# ls
CentOS-Base.repo repo_bak
# 清除并生成新的缓存
[root@DW1 yum.repos.d]# yum clean all
[root@DW1 yum.repos.d]# yum makecache
安装EPEL源
[root@DW1 yum.repos.d]# yum list | grep epel-release
epel-release.noarch 7-11 extras
[root@DW1 yum.repos.d]# yum install -y prep epel-release
# 安装完成后
[DW1 yum.repos.d]# ls
CentOS-Base.repo epel.repo epel-testing.repo repo_bak
# 再次清除并生成新的缓存
[root@DW1 yum.repos.d]# yum clean all
[root@DW1 yum.repos.d]# yum makecache
查看所有的yum源
安装完成后,查看系统下所有的yum源:
[root@DW1 yum.repos.d]# yum repolist enabled
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 10,019
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,327
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 419
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 2,303
repolist: 26,068
[root@DW1 yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com enabled: 10,019
centosplus/7/x86_64 CentOS-7 - Plus - mirrors.aliyun.com disabled
contrib/7/x86_64 CentOS-7 - Contrib - mirrors.aliyun.com disabled
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 enabled: 13,327
epel-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 - Debug disabled
epel-source/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 - Source disabled
epel-testing/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 disabled
epel-testing-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - De disabled
epel-testing-source/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - So disabled
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com enabled: 419
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com enabled: 2,303
repolist: 26,068
参考资料
内容总结
以上是互联网集市为您收集整理的CentOS7配置阿里云yum源和EPEL源(二)全部内容,希望文章能够帮你解决CentOS7配置阿里云yum源和EPEL源(二)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。