GNU/Linux >> Linux の 問題 >  >> Cent OS

CentOS 7 /RHEL7でEPELリポジトリを有効にする方法

EPELリポジトリは、標準リポジトリでは利用できないRed Hat Enterprise Linux(RHEL)、CentOSおよびScientific Linux(SL)、Oracle Enterprise Linux(OEL)を含むEnterpriseLinuxVariant用の追加パッケージを提供します。

この投稿では、CentOS 7 / RHEL 7でEPEL(Enterprise Linux用の追加パッケージ)リポジトリを有効にする方法を説明します。

EPELリポジトリを有効にする

CentOS 7

次のコマンドを使用して、EPELリポジトリ構成パッケージをインストールします。

yum install -y epel-release

出力:

Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                         Arch                      Version                 Repository                 Size
===================================================================================================================
Installing:
 epel-release                    noarch                    7-11                    extras                     15 k

Transaction Summary
===================================================================================================================
Install  1 Package

Total 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 transaction
  Installing : epel-release-7-11.noarch                                                                        1/1 
  Verifying  : epel-release-7-11.noarch                                                                        1/1 

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

Complete!

RHEL 7

次のコマンドを使用して、EPELリポジトリ構成パッケージをインストールします。

yum install -y https://dl.fedoraproject.org/pub/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-k6zgIl/epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
Marking /var/tmp/yum-root-k6zgIl/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                   Arch                Version            Repository                                  Size
===================================================================================================================
Installing:
 epel-release              noarch              7-11               /epel-release-latest-7.noarch               24 k

Transaction Summary
===================================================================================================================
Install  1 Package

Total size: 24 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                        1/1 
  Verifying  : epel-release-7-11.noarch                                                                        1/1 

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

Complete!

すべてのリポジトリを一覧表示する

リストにEPELリポジトリがあります。

yum repolist

出力

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fileplanet.com
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: centos.mirrors.tds.net
 * updates: mirror.fileplanet.com
repo id                                      repo name                                                             status
base/7/x86_64                                CentOS-7 - Base                                                       10,097
epel/x86_64                                  Extra Packages for Enterprise Linux 7 - x86_64                        13,384
extras/7/x86_64                              CentOS-7 - Extras                                                        304
updates/7/x86_64                             CentOS-7 - Updates                                                       310
repolist: 25,012

EPELリポジトリにパッケージを一覧表示する

yum list available --disablerepo=* --enablerepo=epel

パッケージリストは次のようになります。

.     .     .
.     .     .

zsh-lovers.noarch                                                   0.9.0-1.el7                                      epel
zstd.x86_64                                                         1.4.2-1.el7                                      epel
zulucrypt.x86_64                                                    5.0.1-1.el7                                      epel
zulucrypt-console.x86_64                                            5.0.1-1.el7                                      epel
zulucrypt-devel.x86_64                                              5.0.1-1.el7                                      epel
zulucrypt-doc.noarch                                                5.0.1-1.el7                                      epel
zulucrypt-libs.x86_64                                               5.0.1-1.el7                                      epel
zvbi.x86_64                                                         0.2.35-1.el7                                     epel
zvbi-devel.x86_64                                                   0.2.35-1.el7                                     epel
zvbi-fonts.noarch                                                   0.2.35-1.el7                                     epel

EPELリポジトリでパッケージを検索

パッケージを検索するには、検索またはリストオプションを使用します。

yum search ansible

出力:

Loading mirror speeds from cached hostfile
 * base: mirror.fileplanet.com
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: centos.mirrors.tds.net
 * updates: mirror.fileplanet.com
================================================= N/S matched: ansible ==================================================
ansible-doc.noarch : Documentation for Ansible
ansible-inventory-grapher.noarch : Creates graphs representing ansible inventory
ansible-lint.noarch : Best practices checker for Ansible
ansible-openstack-modules.noarch : Unofficial Ansible modules for managing Openstack
ansible.noarch : SSH-based configuration management, deployment, and task execution system

または

yum list ansible

出力:

Loading mirror speeds from cached hostfile
 * base: mirror.fileplanet.com
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: centos.mirrors.tds.net
 * updates: mirror.fileplanet.com
Available Packages
ansible.noarch                                              2.8.4-1.el7                                              epel

EPELリポジトリからパッケージをインストールする

デフォルトでは、EPELリポジトリは有効になっています。したがって、単純なyumコマンドを使用してEPELリポジトリから任意のパッケージをインストールできます。

yum install ansible

結論

それで全部です。コメントセクションでフィードバックを共有してください。


Cent OS
  1. CentOS 8 /RHEL8にPipをインストールする方法

  2. Rocky Linux /Centos8にEPELリポジトリをインストールして有効にする方法

  3. CentOS / RHEL 6 で IPv6 を有効にする方法

  1. CentOS / RHEL 7 で IPv6 を有効にする方法

  2. CentOS/RHEL で yum リポジトリを作成する方法

  3. CentOS/RHEL 8 で IPv6 を有効にする方法

  1. CentOS /RHEL7でSELinuxを有効にする方法

  2. CentOS / RHEL 5 で IPv6 を有効にする方法

  3. CentOS/RHEL 5、6、7 で X11 転送を有効にする方法