The EPEL repository is an additional repository that creates, maintains, and manages a high-quality set of extra packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server. It is a crucial component for system administrators in managing their servers as it provides a set of additional packages that are not included in the default CentOS and RHEL repositories. By installing the EPEL repository, you can enhance the functionality of your CentOS server with a variety of software packages available through this repository.
In this guide, we will walk you through the process of installing and configuring the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. This guide is designed to be easy to follow, with step-by-step instructions to ensure a smooth installation process. We will cover everything from importing the GPG keys for EPEL software packages to setting the priority for the EPEL repository.
Before we begin, it’s important to note that this guide is intended for users who have a basic understanding of CentOS and command line interface. If you’re new to CentOS, you might want to check out our articles on dedicated server and VPS server hosting to get a better understanding of how servers work.
Step 1: Importing the GPG keys for EPEL software packages
The first step in installing the EPEL repository is to import the GPG keys for the EPEL software packages. This can be done using the wget command to download the keys from the official Fedora project website.
[root@centos62 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
Example:
[root@centos62 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 --2012-03-07 22:08:39-- http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 Resolving ftp.riken.jp... 134.160.38.1 Connecting to ftp.riken.jp|134.160.38.1|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1649 (1.6K) [text/plain] Saving to: âRPM-GPG-KEY-EPEL-6â 100%[==========================================================>] 1,649 --.-K/s in 0.002s 2012-03-07 22:08:40 (929 KB/s) - âRPM-GPG-KEY-EPEL-6â
Step 2: Enabling the EPEL repositories
After importing the GPG keys, the next step is to enable the EPEL repositories. This can be done using the rpm command with the –import option.
[root@centos62 ~]# rpm --import RPM-GPG-KEY-EPEL-6
Step 3: Downloading the EPEL repository for 32-bit CentOS
Next, we need to download the EPEL repository for 32-bit CentOS. This can be done using the wget command to download the repository from the official Fedora project website.
[root@centos62 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Example:
[root@centos62 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm --2012-03-07 22:06:10-- http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm Resolving dl.fedoraproject.org... 209.132.181.27, 209.132.181.23, 209.132.181.24, ... Connecting to dl.fedoraproject.org|209.132.181.27|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 14064 (14K) [application/x-rpm] Saving to: âepel-release-6-5.noarch.rpmâ 100%[==========================================================>] 14,064 36.7K/s in 0.4s 2012-03-07 22:06:14 (36.7 KB/s) - epel-release-6-5.noarch.rpmâ
Step 4: Installing the EPEL repository on 32-bit CentOS
After downloading the EPEL repository, the next step is to install it. This can be done using the rpm command with the -ivh option.
[root@centos62 ~]# rpm -ivh epel-release-6-5.noarch.rpm
Example:
[root@centos62 ~]# rpm -ivh epel-release-6-5.noarch.rpm Preparing... ########################################### [100%] 1:epel-release ########################################### [100%]
Step 5: Editing the EPEL repository file and setting the priority
The final step in the installation process is to edit the EPEL repository file and set the priority for the EPEL repository. This can be done using the vi editor to open the repository file.
[root@centos62 ~]# vi /etc/yum.repos.d/epel.repo
In the [epel] section, under enabled=1, add priority=3:
[epel] name=Extra Packages for Enterprise Linux 6 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 priority=3 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 [epel-debuginfo] name=Extra Packages for Enterprise Linux 6 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 6 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1
Understanding the EPEL Repository
Now that we have installed and configured the EPEL repository, it’s important to understand what it offers. The EPEL repository provides a set of additional packages that are not included in the default CentOS and RHEL repositories. These packages are maintained and managed by the Fedora Project community and are available for installation on CentOS and RHEL servers.
To see what packages and versions are available in EPEL, you can check any of the available EPEL mirrors from the mirror list.
Commands Mentioned
- wget – used to download files from the internet
- rpm –import – used to import a public key to the system
- rpm -ivh – used to install a .rpm package
- vi – a text editor used to modify configuration files
Conclusion
In this guide, we have walked you through the process of installing and configuring the EPEL repository on CentOS 6.2. We have covered everything from importing the GPG keys to setting the priority for the EPEL repository. We hope this guide has been helpful in enhancing your CentOS server with the variety of software packages available through the EPEL repository.
Remember, the EPEL repository is an important tool for system administrators. It provides a set of additional packages that are not included in the default CentOS and RHEL repositories. By installing the EPEL repository, you can enhance the functionality of your CentOS server and make it more versatile for your needs.
If you have any questions or run into any issues, feel free to refer back to this guide or check out our other articles on Apache, Nginx, LiteSpeed, dedicated server, VPS server, cloud hosting, and shared hosting for more information.
FAQ
-
What is the EPEL repository?
The EPEL (Extra Packages for Enterprise Linux) repository is an open-source and free community-based repository project from the Fedora team which provides high-quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.
-
Why do we need to import GPG keys for EPEL?
GPG keys are used to verify the authenticity and integrity of packages. By importing the GPG keys for EPEL, you are ensuring that the packages you install from EPEL are not tampered with and are indeed from the EPEL repository.
-
What does the rpm –import command do?
The rpm –import command is used to import apublic key to the system. This public key will be used by the system to verify the authenticity and integrity of packages that are being installed.
-
What is the purpose of setting priority in the EPEL repository file?
Setting a priority for the EPEL repository in the repository file determines the order in which repositories are checked for packages. A lower priority number means the repository will be checked first. This can be useful in situations where a package is available in multiple repositories.
-
How can I check what packages are available in the EPEL repository?
You can check the available packages in the EPEL repository by visiting any of the EPEL mirrors from the mirror list. Alternatively, you can browse the package set using repoview.
1 Comment
Very useful information. Thanks for sharing