【阿里云镜像】配置阿里巴巴开源镜像站镜像——Epel镜像

简介: 【阿里云镜像】配置阿里巴巴开源镜像站镜像——Epel镜像

一、📌 参考链接


阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)


epel镜像-epel下载地址-epel安装教程-阿里巴巴开源镜像站 (aliyun.com)


阿里云开源镜像站资源目录 (aliyun.com)


二、🔊 Epel 镜像简介


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


下载地址:https://mirrors.aliyun.com/epel/


三、🎄 配置方法


1、更新YUM源🎃


[root@centos ~]# yum clean all
[root@centos ~]# yum repolist


2、 备份(如有配置原来的epel源)🎁


mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup


3、下载新repo 到/etc/yum.repos.d/🏆


1)安装 epel 配置包💎


安装对应的安装包(本实验以CentOS 7系统为例)


[root@centos ~]# hostnamectl
   Static hostname: centos
         Icon name: computer-vm
           Chassis: vm
        Machine ID: f6fc8fb7991c4c518238af7c75f16046
           Boot ID: 543d1319d8164d8dac9e789e553f3ae5
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-1160.el7.x86_64
      Architecture: x86-64
[root@centos ~]#
[root@centos ~]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: fastestmirror
epel-release-latest-7.noarch.rpm                                                                 |  15 kB  00:00:00     Examining /var/tmp/yum-root-_WgcRs/epel-release-latest-7.noarch.rpm: epel-release-7-14.noarch
Marking /var/tmp/yum-root-_WgcRs/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-14 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================== Package                    Arch                 Version              Repository                                   Size
========================================================================================================================Installing:
 epel-release               noarch               7-14                 /epel-release-latest-7.noarch                25 k
Transaction Summary
========================================================================================================================Install  1 Package
Total size: 25 k
Installed size: 25 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-14.noarch                                                                             1/1   Verifying  : epel-release-7-14.noarch                                                                             1/1 
Installed:
  epel-release.noarch 0:7-14                                                                                            
Complete!
[root@centos ~]#
[root@centos ~]# cd /etc/yum.repos.d/
[root@centos yum.repos.d]# ll
total 60
-rw-r--r--. 1 root root 2523 Nov 28 18:12 CentOS-Base.repo
-rw-r--r--. 1 root root 1664 Oct 23  2020 CentOS-Base.repo.backup
-rw-r--r--. 1 root root 1309 Oct 23  2020 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Oct 23  2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314 Oct 23  2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 Oct 23  2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Oct 23  2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 Oct 23  2020 CentOS-Vault.repo
-rw-r--r--. 1 root root  616 Oct 23  2020 CentOS-x86_64-kernel.repo
-rw-r--r--  1 root root 2081 Dec  3 09:23 docker-ce.repo
-rw-r--r--  1 root root 1358 Sep  5 01:37 epel.repo
-rw-r--r--  1 root root 1457 Sep  5 01:37 epel-testing.repo
-rw-r--r--  1 root root  276 Dec  8 13:15 kubernetes.repo


2)将 repo 配置中的地址替换为阿里云镜像站地址 👑


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*


[root@centos yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@centos yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*


4、更新YUM源 🔒


[root@centos yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras updates
Cleaning up list of fastest mirrors
[root@centos yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                           | 3.6 kB  00:00:00     epel                                           | 4.7 kB  00:00:00     extras                                         | 2.9 kB  00:00:00     updates                                        | 2.9 kB  00:00:00     (1/7): base/7/x86_64/group_gz                  | 153 kB  00:00:00     (2/7): epel/x86_64/group_gz                    |  96 kB  00:00:00     (3/7): extras/7/x86_64/primary_db              | 243 kB  00:00:02     (4/7): epel/x86_64/updateinfo                  | 1.0 MB  00:00:03     (5/7): base/7/x86_64/primary_db                | 6.1 MB  00:00:06     (6/7): epel/x86_64/primary_db                  | 7.0 MB  00:00:06     (7/7): updates/7/x86_64/primary_db             |  13 MB  00:00:07     repo id                    repo name                  status
base/7/x86_64  CentOS-7 - Base - mirrors.aliyun.com      10,072
epel/x86_64   Extra Packages for Enterprise Linux 7 - x86_64   13,691
extras/7/x86_64   CentOS-7 - Extras - mirrors.aliyun.com       500
updates/7/x86_64   CentOS-7 - Updates - mirrors.aliyun.com 3,190
repolist: 27,453
[root@centos yum.repos.d]#
相关文章
|
缓存 Ubuntu 前端开发
Linux配置yum源以及基本yum指令
Linux配置yum源以及基本yum指令
Yum工具详解(二)-----Yum配置阿里源
Yum工具详解(二)-----Yum配置阿里源
6437 1
|
Kubernetes Linux Docker
银河麒麟v10离线安装docker二进制包
银河麒麟v10离线安装docker二进制包
4967 0
|
缓存 Linux
CentOS7配置阿里yum源 超详细!!!
CentOS7配置阿里yum源 超详细!!!
35706 2
|
8月前
|
人工智能 自然语言处理 网络安全
2026年阿里云部署OpenClaw(Clawdbot)快速接入钉钉保姆级教程
2026年,AI自动化办公与企业IM协作深度融合,OpenClaw(前身为Clawdbot、Moltbot)作为轻量级开源AI代理平台,凭借“自然语言指令驱动、多工具协同、零编程门槛”的核心优势,成为个人与企业解锁“AI+IM”协同办公的首选工具。它无需复杂操作,仅需输入口语化指令,就能自动完成文档整理、邮件处理、日程规划、跨平台数据同步等重复性工作,而阿里云推出的OpenClaw一键部署方案,彻底解决了传统部署流程繁琐、环境配置复杂的痛点,新手10分钟即可完成云端部署。
7182 4
|
网络协议 Linux
nmcli命令详解
【4月更文挑战第9天】`nmcli`是Red Hat 7及CentOS 7后的网络管理命令,用于配置网卡并持久化设置。它可以显示网络连接信息(如`connection show`、`dev status`),控制网卡状态(启用、停用、删除连接),以及修改配置(如IP地址、DNS)。其他功能包括检查NetworkManager状态、开关网络连接和查看系统网络状态。要了解全部详情和高级用法,建议查阅相关文档。
2507 1
|
缓存 Linux
Centos7配置国内yum源和epel源
本篇内容记录了Centos7如何配置国内yum源和epel源。
14777 1
|
11月前
|
存储 安全 数据安全/隐私保护
HashiCorp Vault 镜像拉取与 Docker 部署全指南
Vault是HashiCorp推出的企业级秘密管理工具,支持集中存储、细粒度访问控制、动态凭证生成与全链路审计。通过Docker部署可实现环境一致、安全隔离、快速迭代,适用于开发测试及生产环境,助力企业高效安全管理敏感信息。
748 3
|
安全 Linux
安装EPEL Repository Centos 7.9
记住,行走在Linux的世界,把“学习”作为你不可或缺的随身宝典。今天你学会了如何将EPEL这座外来的宝库接入你的系统,明天,你或许就能在这座宝库中发现一款能领你走向Linux大师之路的神器。
899 5
|
安全 Linux
安装EPEL Repository Centos 7.9
记住,行走在Linux的世界,把“学习”作为你不可或缺的随身宝典。今天你学会了如何将EPEL这座外来的宝库接入你的系统,明天,你或许就能在这座宝库中发现一款能领你走向Linux大师之路的神器。
1279 7