麒麟V10配置EPEL源指南
概述
在麒麟V10系统上配置EPEL(Extra Packages for Enterprise Linux)源,可以方便安装大量额外的开源软件包。由于麒麟V10基于CentOS系(内核版本介于CentOS 8与9之间),大部分 EPEL 8 的软件包都能直接使用。
方法一:直接安装官方EPEL RPM包
操作步骤
1. 下载并安装EPEL源RPM包
1 2
| wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm rpm -ivh epel-release-latest-8.noarch.rpm --nodeps --force
|
2. 清理缓存并生成新缓存
1 2
| yum clean all yum makecache
|
3. 测试安装软件
方法二:使用国内镜像(推荐)
操作步骤
1. 创建EPEL仓库配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| cat > /etc/yum.repos.d/epel.repo <<EOF [epel] name=Extra Packages for Enterprise Linux 8 - \$basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/8/Everything/\$basearch/ enabled=1 gpgcheck=0 countme=1
[epel-debuginfo] name=Extra Packages for Enterprise Linux 8 - \$basearch - Debug baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/8/Everything/\$basearch/debug/ enabled=0 gpgcheck=0
[epel-source] name=Extra Packages for Enterprise Linux 8 - \$basearch - Source baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/8/Everything/source/tree/ enabled=0 gpgcheck=0 EOF
|
2. 更新缓存并测试
1 2
| yum makecache yum install vnstat -y
|
验证方式
执行 yum repolist 确认 epel 仓库已启用,并能正常安装来自EPEL的软件包。
配置建议
- 版本选择:麒麟V10建议使用 EPEL 8 源
- 架构适配:对于ARM架构,
$basearch 会自动匹配 aarch64,无需手动修改
- 网络优化:若需长期稳定运行,建议优先选择国内镜像以减少网络延迟