EPEL 软件仓库

项目简介

EPEL(Extra Packages for Enterprise Linux) 是由 Fedora Special Interest Group 维护的 Enterprise Linux(RHEL、CentOS)中经常用到的包。

使用方法

下面以 Rocky Linux 9 为例讲解如何使用本镜像站的 epel 镜像。RHEL 及其他衍生发行版同样可用该方法。

首先从 Extras 里安装 epel-release:

{{sudo}}dnf install epel-release

用如下命令自动替换:(修改自 https://github.com/tuna/issues/issues/687

{{sudo}}sed -e 's!^metalink=!#metalink=!g' \
    -e 's!^#baseurl=!baseurl=!g' \
    -e 's!https\?://download\.fedoraproject\.org/pub/epel!{{endpoint}}!g' \
    -e 's!https\?://download\.example/pub/epel!{{endpoint}}!g' \
    -i /etc/yum.repos.d/epel{,-testing}.repo

epel.repo 的修改结果如下:(仅供参考,不同版本可能不同)

[epel]
name=Extra Packages for Enterprise Linux $releasever - $basearch
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
baseurl={{endpoint}}/$releasever/Everything/$basearch/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir
enabled=1
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever

[epel-debuginfo]
name=Extra Packages for Enterprise Linux $releasever - $basearch - Debug
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
baseurl={{endpoint}}/$releasever/Everything/$basearch/debug/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-$releasever&arch=$basearch&infra=$infra&content=$contentdir
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux $releasever - $basearch - Source
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
baseurl={{endpoint}}/$releasever/Everything/source/tree/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-$releasever&arch=$basearch&infra=$infra&content=$contentdir
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever
gpgcheck=1

由于无法同步,镜像站不包含 EPEL Cisco OpenH264 仓库(epel-cisco-openh264.repo),如果不需要可手动将其改为 enabled=0

运行 dnf update 测试一下吧。

本站由北外信息技术中心支持创办,由清华大学 TUNA 协会运行维护。

清华大学 TUNA 协会,全名清华大学学生网络与开源软件协会,是由清华大学热爱网络技术和开源软件的极客组成的学生技术社团。

本站相关源码可在 这里(镜像管理器)这里(镜像站网页) 获取。

根据相关法律法规,本站不对欧盟用户提供服务。

bars envelope hashtag github weibo