AnolisOS 8 &BClinux 安装 epel源

一些yum安装包(如zabbix、ansible等)不在BaseOSAppStream/中,但需要通过yum或者dnf方式去安装,需要

EPEL 代表 "Extra Packages for Enterprise Linux",它是一个自由开源的附加软件包仓库,可用于 CentOS 和 RHEL 服务器。顾名思义,EPEL 仓库提供了额外的软件包,这些软件在 CentOS 8 和 RHEL 8 的默认软件包仓库中不可用。

EPEL 仓库的先决条件

  • 最小化安装的 CentOS 8 和 RHEL 8 服务器
  • root 或 sudo 管理员权限
  • 网络连接

阿里云AnolisOS epel8源配置

bash 复制代码
1)安装epel配置包
dnf install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm

2)替换为阿里云的地址
sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*

3)清除缓存
dnf clean all

4) 建立缓存
dnf makecache

龙蜥AnolisOS8无法检索出epel的软件的办法

bash 复制代码
#如果没有看到epel网络源的软件包
dnf list all


#解决方法需要启用epel源,如果显示禁用或者disable
#列出所有的存储库
dnf repolist all|grep epel     
epel                epel                     禁用



#启用epel源
dnf config-manager --set-enable epel

#查看epel源的状态
dnf repolist epel|grep epel      
Repository epel is listed more than once in the configuration
仓库 id                            仓库名称                          状态
epel                               epel                            启用

移动BClinux epel8源配置

bash 复制代码
1)安装epel配置包
dnf install -y https://mirrors.cmecloud.cn/epel/epel-release-latest-8.noarch.rpm

2)替换为阿里云的地址
sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.cmecloud.cn|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*

#注:如果使用http,就改为http://mirrors.cmecloud.cn

3)清除缓存
dnf clean all

4) 建立缓存
dnf makecache

移动BClinux 无法检索出epel的软件的办法

bash 复制代码
#如果没有看到epel网络源的软件包
dnf list all


#解决方法需要启用epel源,如果显示禁用或者disable
#列出所有的存储库
dnf repolist all|grep epel     
epel                epel                     禁用



#启用epel源
dnf config-manager --set-enable epel

#查看epel源的状态
dnf repolist epel|grep epel      
Repository epel is listed more than once in the configuration
仓库 id                            仓库名称                          状态
epel                               epel                            启用

从 EPEL 仓库中搜索软件包

bash 复制代码
#列出 EPEL 仓库种所有可用包

dnf repository-packages epel list



#搜索 EPEL 仓库中的 Zabbix 包,请执行以下 dnf 命令,

dnf repository-packages epel list | grep -i zabbix
相关推荐
七七powerful10 天前
为离线的bcliunx euler&龙晰 配置 yum源 nginx代理
nginx·yum·bclinux