CentOS 7 epel yum源

本文介绍了如何在CentOS 7系统中查看当前的yum源版本,安装EPEL(Extra Packages for Enterprise Linux)yum源,并检查已启用的模块。通过这些步骤,用户可以确保系统获得最新的软件包和支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#查看Centos yum源版本
#安装Centos epel yum源
#查看Centos yum源 enable的模块

备注:使用Centos版本如下:
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

#查看Centos yum源版本
[root@localhost ~]# yum --version
3.4.3
Installed: rpm-4.11.3-32.el7.x86_64 at 2019-11-16 09:45
Built : CentOS BuildSystem http://bugs.centos.org at 2018-04-11 03:54
Committed: Panu Matilainen pmatilai@redhat.com at 2017-11-13

Installed: yum-3.4.3-158.el7.centos.noarch at 2019-11-16 09:46
Built : CentOS BuildSystem http://bugs.centos.org at 2018-04-13 12:58
Committed: CentOS Sources bugs@centos.org at 2018-04-10

Installed: yum-plugin-fastestmirror-1.1.31-45.el7.noarch at 2019-11-16 09:46
Built : CentOS BuildSystem http://bugs.centos.org at 2018-04-11 04:16
Committed: Valentina Mukhamedzhanova vmukhame@redhat.com at 2017-11-21
#安装Centos epel yum源
[root@localhost ~]# yum list |grep epel-release //查看epel版本
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
epel-release.noarch 7-11 extras
[root@localhost ~]# ls /etc/yum.repos.d/ //查看是否有安装epel模块,如果不存在epel文件,则表示没有安装epel
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost ~]# yum install epel-release -y //安装epel模块
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

Resolving Dependencies
–> Running transaction check
—> Package epel-release.noarch 0:7-11 will be installed
–> Finished Dependency Resolution

Installing:
epel-release noarch 7-11 extras 15 k

Installed:
epel-release.noarch 0:7-11

Complete!
#查看Centos yum源 enable的模块
[root@localhost ~]# yum repolist enable //查看哪些yum模块开启
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 8.8 kB 00:00:00

  • base: ftp.sjtu.edu.cn
  • epel: hkg.mirror.rackspace.com
  • extras: mirrors.aliyun.com
  • updates: mirror.hkt.cc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值