Sunday, June 16, 2013

               
   
   
   

How to configure RPMforge RPM Repository in RHEL6

Q. I have configured local repository and trying to install fping package but I am getting error "No package fping available" how do I install fping via yum?

If you want to install a package which is not in the  local repository then you need to install third party RPMforge repository. It provides thousand of RPMs packages

So lets see your problem now we have only one local repository
# yum repolist
Sample Output :
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
repo id                                                    repo name                                                   status
local.repo                                                 local.repo                                                  2,762
repolist: 2,762
Let’s try to install the fping package
#yum install fping
Sample Output :
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
No package fping available.
Error: Nothing to do
Unable to install fping with local repo so let’s install rpmforge 

Note: As per your RHEL arch you can download the RPM from below source & install

1. For example we are going to download rpmforge for RHEL6 32 bit arch
#wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
Sample Output:
--2013-06-16 15:11:32--  http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
Resolving apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12664 (12K) [application/x-redhat-package-manager]
Saving to: “rpmforge-release-0.5.3-1.el6.rf.i686.rpm”

100%[===================================================================================>] 12,664      18.8K/s   in 0.7s    

2013-06-16 15:11:35 (18.8 KB/s) - “rpmforge-release-0.5.3-1.el6.rf.i686.rpm” saved [12664/12664]
2.Now Lets Install the rpmforge RPM
# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.i686.rpm
Sample Out :
warning: rpmforge-release-0.5.3-1.el6.rf.i686.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing...                ########################################### [100%]
  1:rpmforge-release       ########################################### [100%
3.Once you have installed rpmforge RPM it will auto create a configuration file in the /etc/yum.repos.d/
# cd /etc/yum.repos.d/
#cat rpmforge.repo
Sample Output :

### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
Note: enabled = 1 means turn on the repository

4.Check repolist & you can see two repositories  
#yum repolist
Sample Output :
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
repo id                                         repo name                                                              status
local.repo                                      local.repo                                                             2,762
rpmforge                                        RHEL 6Server - RPMforge.net - dag                          4,658
repolist: 7,420

Here you can see we have 2762 RPM’s in the local repo and 4658 RPM’s in rpmforge repo.
Total=7420 RPM’s

Now Let’s try to install fping package

[root@dc ~]# yum install fping
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
rpmforge                                                                                              | 1.9 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package fping.i686 0:3.4-1.el6.rf will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
Package                    Arch                      Version                            Repository                     Size
=============================================================================================================================
Installing:
fping                      i686                      3.4-1.el6.rf                       rpmforge                       45 k

Transaction Summary
=============================================================================================================================
Install       1 Package(s)

Total download size: 45 k
Installed size: 122 k
Is this ok [y/N]: y
Downloading Packages:
fping-3.4-1.el6.rf.i686.rpm                                                                           |  45 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : fping-3.4-1.el6.rf.i686                                                                                   1/1
duration: 83(ms)
Installed products updated.

Installed:
 fping.i686 0:3.4-1.el6.rf                                                                                                  

Complete!
[root@dc ~]# fping www.datacenterins.com
www.datacenterins.com is alive

Wow !!

Note: If the package is not found in the local repo then yum will try to install from next available repo (rpmforge)

If you want to install the package from specific repository you can use ----enablerepo=[repo] options
#yum --enablerepo=[rpmforge] install fping

Hope this help you If you like please share it :)

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Follow my blog with Bloglovin UA-41829888-1