2018-03-21

How to install EPEL Packages

What is EPEL?

EPEL stands for Extra Packages for Enterprise Linux. As I have stated before, the Extra Packages are rebuilds of packages from various Fedora Project Linux releases with an aim to keep EPEL packages slower moving than what is in Fedora. The Enterprise Linux in this statement is aimed at the Red Hat Enterprise Linux and the many rebuilds of it (CentOS, Scientific Linux, Oracle Linux and sometimes Amazon Linux). [As opposed to the enterprise offerings from SuSE or Canonical.] 

How to set up EPEL?

In order to enable the EPEL repositories, you need to do the following things. 
  1. Determine which version of an Enterprise Linux you are using by looking in the /etc/system-release file. On my CentOS-6 system it looks like  
    
    [root@el-6 ~]# cat /etc/system-release
    CentOS release 6.9 (Final)
    
    and on my CentOS 7 system it currently looks like
    
    [root@el-7 ~]# cat /etc/system-release
    CentOS Linux release 7.4.1708 (Core) 
    
  2. If you are running CentOS or Scientific Linux you can now simply install and enable EPEL with a yum command:
    
    [root@el-7 ~]# yum --enablerepo=extras install epel-release
    [root@el-6 ~]# yum --enablerepo=extras install epel-release
    
    This will install the release keys and files with a package which has been signed by your distribution for you to have a chain of trust.
  3. If you are running Red Hat Enterprise Linux, you will need to do some extra steps. We will use EL-7 but they would be similar for EL-6.
    1. Read the page at https://getfedora.org/keys/faq/
    2. Download the RPM and GPG key and confirm they are valid.
      
      # wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
      # wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
      # rpm --import RPM-GPG-KEY-EPEL-7
      # rpm -K epel-release-latest-7.noarch.rpm
      # rpm -K epel-release-latest-7.noarch.rpm 
      epel-release-latest-7.noarch.rpm: rsa sha1 (md5) pgp md5 OK
      
  4. If you are more of a curl | su - type person then you can just install directly from the internet using the rpm command. I don't recommend this but it gets asked a lot.
  5. You can now list the packages using yum list which will give more packages. These can be installed with the normal install methods. If you did not already import the gpg keys, you will be prompted to trust these keys.
    
    [root@el-7 ~]# yum install pax-utils
    Loaded plugins: auto-update-debuginfo, fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.yellowfiber.net
     * epel: archive.linux.duke.edu
     * epel-testing: packages.oit.ncsu.edu
     * extras: mirror.yellowfiber.net
     * updates: mirror.yellowfiber.net
    Resolving Dependencies
    --> Running transaction check
    ---> Package pax-utils.x86_64 0:1.2.3-1.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===========================================================================
     Package          Arch         Version          Repository             Size
    ===========================================================================
    Installing:
     pax-utils        x86_64       1.2.3-1.el7      epel-testing           96 k
    
    Transaction Summary
    ===========================================================================
    Install  1 Package
    
    Total download size: 96 k
    Installed size: 249 k
    Is this ok [y/d/N]: y
    Downloading packages:
    pax-utils-1.2.3-1.el7.x86_64.rpm                        |  96 kB  00:00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : pax-utils-1.2.3-1.el7.x86_64                           1/1
      Verifying  : pax-utils-1.2.3-1.el7.x86_64                           1/1 
    
    Installed:
      pax-utils.x86_64 0:1.2.3-1.el7
    
    Complete!
    
    
  6. Sometimes you may need to install a package which has not made it to stable yet. Please see my earlier post on that.
  7. I have been told by various people in IRC that they were told by someone else that current version of Amazon Linux was based off EL-6 so they want to use the EL-6 EPEL for it. We have also had lots of reports of people finding things not working at times. I would recommend that any users of Amazon Linux to use what Amazon recommends first.

Side Note:

I have been told multiple times that the EPEL logo looks like a horse's tail swatting flies. I actually think it looks more like a full sail being blown as our original want was to have a trading ship  or even a container ship (this was years before containers) but none of the attempts looked good. This one was provided by the art team as a combination of an backwards E and a P/L. 

No comments: