Showing posts with label epel. Show all posts
Showing posts with label epel. Show all posts

Sunday, March 6, 2016

how to add EPEL & REMI Repository on CentOS/Rhel ?


 EPEL Repository

Adding EPEL Repository to RHEL / CentOS / Scientific Linux 6.x
EPEL is available as rpm, therefore you can install it on your system. You don’t have to manually add any entries on/etc/yum.repos.d/ directory of your system. Since it is available as noarch rpm, you can install it on both 32 and 64 bit systems. I tested this how-to on CentOS 6.5, however it will work on all 6.x versions.
First go to the EPEL repository download page. Download the latest EPEL rpm and install it as shown below.
# wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm
Adding EPEL Repository to RHEL / CentOS / Scientific Linux 5.x
First go to the EPEL repository download page. Download the latest EPEL rpm and install it as shown below.
# wget http://epel.mirror.net.in/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh epel-release-5-4.noarch.rpm
Now list out the installed repositories using command:
# yum repolist
Sample output:
Loaded plugins: fastestmirror, security
Determining fastest mirrors
 * base: mirror.leapswitch.com
 * epel: epel.mirror.net.in
 * extras: mirror.leapswitch.com
 * updates: mirror.leapswitch.com
repo id                                                   repo    name                                                                                      status
base                                                      CentOS-6 - Base                                                                                4,802
epel                                                      Extra Packages for Enterprise Linux 6 - i386                                                   8,385
extras                                                    CentOS-6 - Extras                                                                                 12
updates                                                   CentOS-6 - Updates                                                                               211
repolist: 13,410
Install Packages

Now you can install the packages as usual with command:
# yum install bugzilla

Hence bugzilla is not available in the default repositories, you will see that bugzilla is installed from EPEL repository.

Install packages from EPEL repository only

Let us install a package from EPEL repository. I am gonna install bugzilla package from EPEL repository. The below command shows that i disabled all existing repositories and install the httpd package form EPEL repository.
# yum install --disablerepo="*" --enablerepo=epel bugzilla
View a Package details
Also you can view the package information using command:

# yum info bugzilla
Sample output:
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.leapswitch.com
 * epel: epel.mirror.net.in
 * extras: mirror.leapswitch.com
 * updates: mirror.leapswitch.com
Available Packages
Name        : bugzilla
Arch        : noarch
Version     : 3.4.14
Release     : 1.el6
Size        : 953 k
Repo        : epel
Summary     : Bug tracking system
URL         : http://www.bugzilla.org/
License     : MPLv1.1
Description : Bugzilla is a popular bug tracking system used by multiple open source projects
            : It requires a database engine installed - either MySQL, PostgreSQL or Oracle.
            : Without one of these database engines (local or remote), Bugzilla will not work
            : - see the Release Notes for details.


Install REMI Repository On RHEL / CentOS / Scientific Linux / Fedora


Please be mindful that you should use REMI repository along with EPEL repository. Otherwise you may end up with dependency problem sometimes.

On CentOS/RHEL/Scientific Linux 7 x86_64:

wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm

On CentOS/RHEL/Scientific Linux 6 i386 or x86_64:

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm

## for RHEL only
rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6

On CentOS/RHEL/Scientific Linux 5 i386 or x86_64:

wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm

On Fedora 20  i386 or x86_64:

wget http://rpms.famillecollet.com/remi-release-20.rpm
yum install remi-release-20.rpm

On Fedora 19  i386 or x86_64:

wget http://rpms.famillecollet.com/remi-release-19.rpm
yum install remi-release-19.rpm

On Fedora 18  i386 or x86_64:

rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm

Enable REMI repository


Edit file remi.repo,

vi /etc/yum.repos.d/remi.repo

Find the line enabled =0 and change it to 1 to enable REMI repository.

[...]
enabled=1
[...]

Save and close the file.

Now list out the installed repositories with command:

yum repolist

Sample output:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: epel.mirror.net.in
 * extras: centos.excellmedia.net
 * remi: mirror.smartmedia.net.id
 * updates: centos.excellmedia.net
repo id                                                     repo name                                                                                    status
base/7/x86_64                                               CentOS-7 - Base                                                                              8,465
epel/x86_64                                                 Extra Packages for Enterprise Linux 7 - x86_64                                               5,551
extras/7/x86_64                                             CentOS-7 - Extras                                                                               30
remi                                                        Les RPM de remi pour Enterprise Linux 7 - x86_64                                               671
updates/7/x86_64                                            CentOS-7 - Updates                                                                             577
repolist: 15,294

Now, you’re ready to install packages. You can install packages using command:


yum install <package-name>