Linux系统之Centos安装epel源

  • 一、检查本地系统环境
    • 1.检查系统版本
    • 2.检查系统内核版本
  • 二、检查yum仓库
    • 1.查看repo文件
    • 2.检查yum仓库的状态
  • 三、安装epel源
    • 1.查看系统epel-release.noarch包
    • 2.yum直接安装
    • 3.检查epel源状态
    • 4.查看epel.repo文件
  • 四、使用第三方阿里的epel源
    • 1.清空epel源
    • 2.使用阿里的epel源
    • 3.查看epel源状态
    • 4.查看epel.repo文件
  • 五、安装links工具
    • 1.在epel仓库中安装links工具
    • 2.使用links

一、检查本地系统环境

1.检查系统版本

[root@jeven ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

2.检查系统内核版本

[root@jeven ~]# uname -r
6.1.8-1.el7.elrepo.x86_64

二、检查yum仓库

1.查看repo文件

进入/etc/yum.repos.d目录下,查看系统所有的repo文件

[root@jeven yum.repos.d]# ll
total 12
-rw-r--r--. 1 root root 1759 Jan 28 21:02 CentOS-Base.repo
-rw-r--r--. 1 root root 2081 Jul 26  2022 docker-ce.repo
-rw-r--r--. 1 root root 1946 Jul 10  2022 elrepo.repo

2.检查yum仓库的状态

检查yum仓库的所有镜像源状态


[root@jeven yum.repos.d]# yum repolist all |grep enable
!base/7/x86_64                       CentOS-7 - Base - mirrors.a enabled: 10,072
!docker-ce-stable/7/x86_64           Docker CE Stable - x86_64   enabled:    198
!elrepo                              ELRepo.org Community Enterp enabled:    154
!extras/7/x86_64                     CentOS-7 - Extras - mirrors enabled:    515
!updates/7/x86_64                    CentOS-7 - Updates - mirror enabled:  4,691

三、安装epel源

1.查看系统epel-release.noarch包


[root@jeven yum.repos.d]# yum list all | grep epel-release.noarch
epel-release.noarch                      7-14                          epel

2.yum直接安装

可直接安装epel-release.noarch包,配置epel源。

[root@jeven yum.repos.d]# yum install -y epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* elrepo: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency ResolutionDependencies Resolved====================================================================================================================================================================Package                                     Arch                                  Version                              Repository                             Size
====================================================================================================================================================================
Installing:epel-release                                noarch                                7-11                                 extras                                 15 kTransaction Summary
====================================================================================================================================================================
Install  1 PackageTotal download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                                                 |  15 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : epel-release-7-11.noarch                                                                                                                         1/1 Verifying  : epel-release-7-11.noarch                                                                                                                         1/1 Installed:epel-release.noarch 0:7-11                                                                                                                                        Complete!

3.检查epel源状态

  • 查看yum仓库的所有repo文件
[root@jeven yum.repos.d]# ll
total 20
-rw-r--r--. 1 root root 1759 Jan 28 21:02 CentOS-Base.repo
-rw-r--r--. 1 root root 2081 Jul 26  2022 docker-ce.repo
-rw-r--r--. 1 root root 1946 Jul 10  2022 elrepo.repo
-rw-r--r--. 1 root root  951 Oct  3  2017 epel.repo
-rw-r--r--. 1 root root 1050 Oct  3  2017 epel-testing.repo
  • 清理和重建yum缓存

yum -y clean all && yum makecache
  • 查看yum仓库状态
[root@jeven yum.repos.d]# yum repolist all |grep enable
base/7/x86_64                        CentOS-7 - Base - mirrors.a enabled: 10,072
docker-ce-stable/7/x86_64            Docker CE Stable - x86_64   enabled:    199
elrepo                               ELRepo.org Community Enterp enabled:    155
epel/x86_64                          Extra Packages for Enterpri enabled: 13,740
extras/7/x86_64                      CentOS-7 - Extras - mirrors enabled:    515
updates/7/x86_64                     CentOS-7 - Updates - mirror enabled:  4,691

4.查看epel.repo文件

[root@jeven yum.repos.d]# cat epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

四、使用第三方阿里的epel源

1.清空epel源

yum remove  -y epel-release

2.使用阿里的epel源

[root@jeven yum.repos.d]# wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
--2023-02-01 15:09:07--  https://mirrors.aliyun.com/repo/epel-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 123.6.21.248, 123.6.21.240, 123.6.21.244, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|123.6.21.248|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 664 [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/epel.repo’100%[==========================================================================================================================>] 664         --.-K/s   in 0.007s  2023-02-01 15:09:07 (90.0 KB/s) - ‘/etc/yum.repos.d/epel.repo’ saved [664/664]

3.查看epel源状态

[root@jeven yum.repos.d]# yum repolist all |grep epel
epel/x86_64                          Extra Packages for Enterpri enabled: 13,740
epel-debuginfo/x86_64                Extra Packages for Enterpri disabled
epel-source                          Extra Packages for Enterpri disabled

4.查看epel.repo文件

[root@jeven yum.repos.d]# cat epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0
[root@jeven yu

五、安装links工具

1.在epel仓库中安装links工具

[root@jeven yum.repos.d]# yum -y install links
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* elrepo: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package links.x86_64 1:2.20.2-1.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved====================================================================================================================================================================Package                              Arch                                  Version                                       Repository                           Size
====================================================================================================================================================================
Installing:links                                x86_64                                1:2.20.2-1.el7                                epel                                2.9 MTransaction Summary
====================================================================================================================================================================
Install  1 PackageTotal download size: 2.9 M
Installed size: 4.4 M
Downloading packages:
links-2.20.2-1.el7.x86_64.rpm                                                                                                                | 2.9 MB  00:00:28
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : 1:links-2.20.2-1.el7.x86_64                                                                                                                      1/1 Verifying  : 1:links-2.20.2-1.el7.x86_64                                                                                                                      1/1 Installed:links.x86_64 1:2.20.2-1.el7                                                                                                                                       Complete!

2.使用links

inks -dump  https://www.baidu.com/
[root@jeven yum.repos.d]# links -dump  https://mirrors.aliyun.com/centos/Link: canonical[IMG]开源镜像站免费体验Linux沙箱实验室 全部镜像 域名解析DNS 网站授时NTP 反馈与建议阿里云镜像站> centos镜像配置页> centos镜像下载页> 详细内容Index of /centos/File Name                     File Size Date             Parent directory/             -         -                2/                            -         2010-05-07 01:48 2.1/                          -         2009-09-09 13:18 3/                            -         2010-05-07 01:48 3.1/                          -         2010-05-07 01:48 3.3/                          -         2010-05-07 01:48 3.4/                          -         2010-05-07 01:48 3.5/                          -         2010-05-07 01:48 3.6/                          -         2010-05-07 01:48 3.7/                          -         2010-05-07 01:48 3.8/                          -         2010-05-07 01:48 3.9/                          -         2011-03-03 07:44 4/                            -         2012-03-13 08:24 4.0/                          -         2005-07-19 05:11 4.1/                          -         2005-10-22 01:54 4.2/                          -         2006-11-04 20:43 4.3/                          -         2006-11-11 06:15 4.4/                          -         2007-07-08 02:21 4.5/                          -         2008-01-11 00:12 4.6/                          -         2009-03-31 19:55 4.7/                          -         2010-03-08 18:56 4.8/                          -         2012-03-13 08:14 4.9/                          -         2017-04-03 19:34 5/                            -         2017-04-03 19:35 5.0/                          -         2014-10-16 21:37 5.1/                          -         2014-10-16 21:37 5.10/                         -         2017-04-03 19:30 5.11/                         -         2017-04-03 19:34 5.2/                          -         2014-10-16 21:37 5.3/                          -         2014-10-16 21:37 5.4/                          -         2014-10-16 21:37 5.5/                          -         2014-10-16 21:37 5.6/                          -         2014-10-16 21:37 5.7/                          -         2014-10-16 21:37 5.8/                          -         2014-10-16 21:37 5.9/                          -         2014-10-16 21:38 6/                            -         2018-07-04 01:21 6.0/                          -         2014-10-16 21:42 6.1/                          -         2014-10-16 21:42 6.10/                         -         2020-12-02 17:00 6.2/                          -         2014-10-16 21:42 6.3/                          -         2014-10-16 21:42 6.4/                          -         2014-10-16 21:42 6.5/                          -         2015-01-05 22:33 6.6/                          -         2015-08-12 20:23 6.7/                          -         2016-06-02 00:09 6.8/                          -         2017-06-12 20:38 6.9/                          -         2018-07-25 23:42 7/                            -         2020-11-12 20:29 7.0.1406/                     -         2015-04-07 22:24 7.1.1503/                     -         2016-01-08 23:25 7.2.1511/                     -         2017-01-28 22:29 7.3.1611/                     -         2017-10-25 22:57 7.4.1708/                     -         2018-05-24 21:25 7.5.1804/                     -         2019-01-05 00:00 7.6.1810/                     -         2019-09-25 17:47 7.7.1908/                     -         2020-05-05 00:25 7.8.2003/                     -         2020-11-17 15:28 7.9.2009/                     -         2021-01-18 22:12 8/                            -         2021-11-16 20:47 8-stream/                     -         2023-01-26 15:44 8.0.1905/                     -         2020-10-21 15:52 8.1.1911/                     -         2020-10-21 15:53 8.2.2004/                     -         2020-12-22 23:27 8.3.2011/                     -         2021-09-08 14:57 8.4.2105/                     -         2021-11-17 15:29 8.5.2111/                     -         2021-12-22 08:53 HEADER.html                   1.2 KB    2014-09-30 03:27 HEADER.images/                -         2013-11-07 23:21 RPM-GPG-KEY-CentOS-3          1.8 KB    2004-03-16 07:16 RPM-GPG-KEY-CentOS-4          1.8 KB    2010-05-07 01:48 RPM-GPG-KEY-CentOS-5          1.5 KB    2007-02-20 01:57 RPM-GPG-KEY-CentOS-6          1.7 KB    2011-07-10 22:28 RPM-GPG-KEY-CentOS-7          1.7 KB    2014-07-05 00:01 RPM-GPG-KEY-CentOS-Debug-6    1.7 KB    2011-07-10 22:28 RPM-GPG-KEY-CentOS-Debug-7    1004.0 B  2015-12-09 17:59 RPM-GPG-KEY-CentOS-Official   1.6 KB    2019-09-12 15:39 RPM-GPG-KEY-CentOS-Security-6 1.7 KB    2011-07-10 22:28 RPM-GPG-KEY-CentOS-Testing-6  1.7 KB    2011-07-10 22:28 RPM-GPG-KEY-CentOS-Testing-7  1.7 KB    2015-12-09 17:59 RPM-GPG-KEY-beta              1.5 KB    2007-02-20 01:56 RPM-GPG-KEY-centos4           1.8 KB    2005-02-27 01:51 TIME                          11.0 B    2023-02-01 12:55 build/                        -         2005-06-12 20:56 dir_sizes                     1.1 KB    2023-02-01 12:10 dostools/                     -         2007-04-04 17:45 filelist.gz                   7.2 MB    2023-02-01 12:10 graphics/                     -         2014-06-12 19:59 timestamp.txt                 29.0 B    2023-02-01 12:55 镜像源配置帮助 立即查看下载排行榜最热最新1 centos镜像源2 ubuntu镜像源3 pypi镜像源4 alinux镜像源5 epel镜像源6 debian镜像源7 fedora镜像源8 opensuse镜像源9 kali镜像源10 rockylinux镜像源1 almalinux镜像源2 calculate-linux镜像源3 blender镜像源4 grafana镜像源5 centos-debuginfo镜像源6 oceanbase镜像源7 circlelinux镜像源8 termux镜像源9 centos-stream镜像源10 libreoffice镜像源大家都在搜archlinux镜像源xbmc镜像源rubygems镜像源mariadb镜像源alpine镜像源elrepo镜像源pypi镜像源clfs镜像源deepin镜像源centos-debuginfo镜像源

Linux系统之Centos安装epel源相关推荐

  1. CentOS安装EPEL源

    EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为"红帽系"的操作系统提供额外的软件包,适用于RHEL.CentO ...

  2. CentOS如何下载安装EPEL源

    今天给大家介绍下CentOS下载安装EPEL源的步骤!希望大家喜欢! EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件 ...

  3. 如何在CentOS 5/6上安装EPEL源

    如何在CentOS 5/6上安装EPEL源 2013-12-04 14:45 译者:NearTan Linux中国 字号:T | T 我们可以很容易地通过yum命令从EPEL源上获取上万个在CentO ...

  4. CentOS安装EPEL软件源

    1.用rpm安装epel命令如下: #rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch. ...

  5. 32位安装linux系统下载,CentOS 5.0 i386官方正式版系统(32位)

    CentOS 5.0 是一个企业级的 Linux 发行版本,它是由上游操作系统提供者(UOP)1提供的可自由使用的源代码重新编译而成.CentOS 完全遵守上游提供者的再发行政策,并且以百分之百的软件 ...

  6. 用移动硬盘安装系统linux系统,U盘、移动硬盘引导启动安装linux系统【Centos 6.4 】...

    U盘.移动硬盘引导启动安装linux系统[Centos 6.4 ]( rhel基本相同) 本文案例是我安装32系统的,64位时U盘单个文件大于4G不能fat32格式问题暂时没提供,有条件时一定研究下在 ...

  7. linux下安装epel源

    linux安装epel仓库 方法一:命令安装 方法二:源码包安装 方法一:命令安装 [root@localhost ~]# yum -y install epel-release 方法二:源码包安装 ...

  8. 关于Linux系统之VM安装配置

    哈喽呀各位小無本次介绍关于Linux系统之VM安装配置 好先看看本次目录 目录 一.什么是Linux和Vm 二.centos7的安装 2.1 常见问题 3. 查看.设置IP地址 4. 关机与重启 5. ...

  9. 安装epel源 失败:未知的名称或服务。 wget: 无法解析主机地址 “mirrors.aliyun.com”

    安装epel源 失败:未知的名称或服务. wget: 无法解析主机地址 "mirrors.aliyun.com" 今天yum search mysql发现没有想要的mysql,于是 ...

最新文章

  1. java8编译_为什么在Java7中编译而在Java8中编译?
  2. 【EventBus】发布-订阅模式 ( 使用代码实现发布-订阅模式 )
  3. usb 系统消息_4. Autoware 系统框架概揽
  4. opencv读取视频并保存为图片
  5. windows设备坐标和逻辑坐标的转换
  6. 信息学奥赛一本通 2072:【例2.15】歌手大奖赛
  7. 土是独体字结构吗_毛笔楷书基础练习独体字部首的写法(左部)4
  8. mail linux 客户端,Nylas Mail: 一个 Linux 的免费邮件客户端
  9. (jQuery)插件开发模式
  10. TCP/IP协议-三次握手四次挥手
  11. PAIP.国内软件公司的现状及解决.txt
  12. 黑猫论坛实战免杀教程
  13. 高通平台抓取ramdump并用qcap解析
  14. 简单说明什么是网络的DMZ区域
  15. matlab人口增长线性回归拟合_科学网—matlab线性拟合 - 张瑞龙的博文
  16. STM32学习之红外遥控
  17. 使用docker下载搭建TeamCity容器并使用
  18. 笔记本计算机声音小,笔记本没有声音,小编教你笔记本没有声音怎么修复
  19. 天使投资人刘峻:腾讯的七条命 |捕手志
  20. HttpWebRequest 无法连接到远程服务器

热门文章

  1. DPABISurf的安装及使用(windows系统)
  2. 最长回文子串(多种解法,附马拉车算法)
  3. 如何在网页中浏览和编辑DWG文件 梦想CAD控件 www.mxdraw.com
  4. CentOS7 下安装docker
  5. 用c语言循环读取坐标,C语言之For循环--1(星状图)
  6. 直播预告| 一次实用的“企业级开源大数据平台上层应用”指南
  7. 修改Excel默认字体及单元格居中方式
  8. Web实现:单行文本超出省略强制不换行
  9. 电脑的wifi天线原理_无线网络WIFI天线原理
  10. SPEC2006详细参数和测试过程常见问题处理总结(附实例操作)