在 Rocky Linux 9 上启用 EPEL 和 Remi 仓库

EPEL 仓库

Extra Packages for Enterprise Linux 简称:EPEL 是一个 Fedora 项目,它为企业级Linux Red Hat Enterprise Linux (RHEL)、Rocky Linux (RL)、CentOS、Scientific Linux(SL)、Oracle Enterprise Linux(OEL)、AlmaLinux (AL)等创建、维护和管理一组高质量的附加包。

EPEL 最新版本是 epel-release-latest-9

Remi 仓库

Remi 源大家或许很少听说,但是我们强烈推荐, 尤其对于不想编译最新版的 Linux 使用者, 因为 Remi 源中的软件几乎都是最新稳定版。
或许您会怀疑稳定不?
放心吧, 这些都是 Linux 骨灰级的玩家编译好放进源里的, 他们对于系统环境和软件编译参数的熟悉程度毋庸置疑。
Remi 下载地址: https://rpms.remirepo.net/
官方认证国内源: https://mirrors.tuna.tsinghua.edu.cn/remi/
Remi SRPMS 下载地址: https://rpms.remirepo.net/SRPMS/
Remi 源中包含大量的PHP版本包,可供选择安装,非常方便。

启动 EPEL 与 remi 仓库

更新系统

dnf update -y
dnf upgrade --refresh -y

在 Rocky Linux 9 上启用 EPEL Repo

在安装 Remi 仓库之前,我们需要在 Rocky Linux 9 中启用并安装 EPEL Repo。

# AlmaLinux 9, Rocky Linux 9
dnf config-manager --set-enabled crb
dnf install epel-release

# CentOS Stream 9
dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release

# RHEL 9
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

安装完 EPEL 后,更新您的 Rocky Linux 9 系统以使配置生效。

[root@localhost ~]# dnf update
Extra Packages for Enterprise Linux 9 - x86_64    1.1 MB/s |  12 MB     00:10    
Last metadata expiration check: 0:00:10 ago on Sat Nov 26 10:22:45 2022.
Dependencies resolved.
Nothing to do.
Complete!

在 Rocky Linux 9 上启用 Remi 仓库

现在有了 EPEL 仓库,我们需要在 Rocky Linux 9 中启用 Remi 仓库。运行命令:

dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

查看仓库源

[root@localhost ~]# dnf repolist
repo id                                                        repo name
appstream                                                      Rocky Linux 9 - AppStream
baseos                                                         Rocky Linux 9 - BaseOS
crb                                                            Rocky Linux 9 - CRB
epel                                                           Extra Packages for Enterprise Linux 9 - x86_64
extras                                                         Rocky Linux 9 - Extras
remi-modular                                                   remi's Modular repository for Enterprise Linux 9 - x86_64
remi-safe                                                      Safe remi's RPM repository for Enterprise Linux 9 - x86_64

有一个称为 remi-safe 的仓库。这个 repo 为 PHP 提供额外的包,可以安全地与 RHEL/CentOS/Rocky Base 仓库一起使用。使用 remi-safe 仓库,所有依赖项都在 Base 或 EPEL 仓库中。

Remi 仓库的使用方法

# 列出 remi 仓库下所有可供安装的包
dnf --disablerepo="*" --enablerepo="remi" list available
dnf --disablerepo="*" --enablerepo="remi-safe" list available 

# 这里以安装 php 包为例,使用 remi 仓库安装包,列出所有 php 包
dnf module list php
# 该命令安装 PHP 8.1 及其所有依赖项
dnf module install php:remi-8.1
# 通过 remi 仓库启用或禁用包
# 启用 php remi-8.1
dnf module enable php:remi-8.1 -y
# 禁用 php remi-8.1
dnf module disable php:remi-8.1 -y

永久启用或禁用 Remi 仓库

vi /etc/yum.repos.d/remi.repo

# 将 remi 下面的 enabled 设置为 0 或 1,0:禁用,1:启用。
[remi]
enabled=0

# 对文件进行更改后,必须更新系统才能使配置生效。
dnf update
dnf repolist
Avatar photo

关于 木子

Founder of the Rocky Linux Chinese community, MVP、VMware vExpert、TVP, advocate for cloud native technologies, with over ten years of experience in site reliability engineering (SRE) and the DevOps field. Passionate about Cloud Computing、Microservices、CI&CD、DevOps、Kubernetes, currently dedicated to promoting and implementing Rocky Linux in Chinese-speaking regions.
用一杯咖啡支持我们,每一篇 [文档] 都经过我们实操,并非从网上一味的copy,期间花费了大量的心思,希望能够帮忙到您。
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇