How to set up EPEL repository on CentOS

来源:互联网 发布:带端口的ping 编辑:程序博客网 时间:2024/05/29 13:38

http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html

这个网站可能被墙,转载下,大家看起来方便

 

注意不管你是32位还是64机器,都是一样的,这个包只是些文本配置,所以是noarch

[root@172 ~]# rpm -ql epel-release
/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
/etc/rpm/macros.ghc-srpm
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/epel.repo
/usr/share/doc/epel-release-6
/usr/share/doc/epel-release-6/GPL

 

 

 

原文如下:

 

If you are using CentOS or RHEL, it is strongly recommended that you configureEPEL (Extra Packages for Enterprise Linux) repository on your system.  EPEL is a community effort to create a repository of high-quality add-on free software packages for RHEL-based distributions.  Once you set up EPEL repository, you can useyum command to install any of close to 7,000 EPEL packages.

In order to enable EPEL repository on your CentOS system, you need to check CentOS version. To do that, run the following command.

$ cat /etc/redhat-release
CentOS release 6.3 (Final)

Then install a corresponding EPEL release RPM package as follows.  Note that the EPEL release RPM does not depend on the underlying processor architecture (e.g., 32-bit/64-bit x86, ppc, sparc, alpha, etc), so no need to pay attention to processor architecture difference.

Set up EPEL on CentOS 7

Starting from CentOS 7, EPEL release RPM package is available in "extras" repo. Therefore, simply useyum command to set up EPEL repository on these platforms:

$ sudo yum install epel-release

Set up EPEL on CentOS 6 or Earlier

For earlier versions of CentOS, you can use rpm command to download and install a RPM file manually as follows.

 

For CentOS/RHEL 6.*:

$ sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm

For CentOS/RHEL 5.*:

$ sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/5/i386/epel-release-5-4.noarch.rpm

During installation, you may see the following warning, which indicates that EPEL's GPG key is missing.

warning: /var/tmp/rpm-tmp.3TKM2G: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY

The EPEL's official GPG key is found in /etc/pki/rpm-gpg.  Go ahead and import the GPG key as follows.

$ sudo sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6  (for CentOS 6)
$ sudo sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7  (for CentOS 7)

To verify that EPEL repository has been set up successfully, run the following command to list all available repositories on your system.

$ yum repolist

 

0 0
原创粉丝点击