CentOS / RHEL 安装 EPEL 源教程

码农日常3小时前更新 Trunks
6 0 0

EPEL( Extra Packages for Enterprise Linux是为 CentOS 系统提供软件仓库的项目,为 RHEL / CentOS 提供他们默认不提供的软件包。比如现在流行的 nginx,Certbot 工具等等都可以使用 EPEL 很方便的安装更新。

使用的系统环境:CentOS 7.0

1、安装 EPEL 源可以直接通过执行命令:

Shell
yum install epel-release

进行安装。看到“ Is this ok[y/d/N] ”的时候输入 y,回车继续安装。

Shell
Total download size: 14 k
Installed size: 24 k
Is this ok [y/d/N] : y  #这里输入Y才能继续
Downloading packages:
epel - release - 7 - 9.g.noarch. rpm                    |     14  kb    00 : 00 : 00
Running transactign check
Running transactign test
Transaction test succeeded
Running transactign
  Installing : epel - release - 7 - 9.g.noarch                                   1/1
  Verifying  : epel - release - 7 - 9.g.noarch                                   1/1

Installed:
  epel - release.noarch 0:7-9

Camplete!  #看到这个就算成功了
[root@vm_71_52_Centos ~]#

epel 安装完成后,输入命令 yum repolist 刷新一下。能看到目前提供上万个软件包。

Shell
[root@vm_71_52_Centos ~]# yum repolist
Loaded plugins: fastestmirror,langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
repo id                         repo name                                      status
epel/7/x86_64                   EPEl for redhat/centos 7 - x86_64              11370
extras/7/x86_64                 Qcloud centos extras - x86_64                  311
os/7/x86_64                     Qcloud centos os - x86_64                      9363
updates - x:s 64                Qcloud centos updates - x86_64                 1109
repolist :22153
[root@vm_71_52_Centos ~]# 

2、如果以上命令无法安装可以尝试以下方法

CentOS/RHEL 5 :rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

CentOS/RHEL 6 :rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

CentOS/RHEL 7 :rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Ok,安装完毕。

3、使用 EPEL 源安装软件的方法:以后可以执行命令 yum install 软件包名进行安装常用软件了,EPEL 仓库里面包含了 nginx、Certbot 工具等等一些常用软件都更方便安装了。

© 版权声明

相关文章

暂无评论

暂无评论...