Centos 6/RHEL install additional Repositories & Priorities

Here is a list of repos which are useful for extra packages while building up your system. You can use them manually and have them set at disabled until you need them or you can experiment with yum priorities which is the recommended way. Using priorities you can control which repo gets used if multiple repos supply the same packages. If using yum priorities you will need to perform some tasks to start with.


First obtain the priorities & yum-utils packages for Centos 6.

$ sudo yum -y install yum-plugin-priorities yum-utils

Now add lines to the two conf files

$ sudo vi /etc/yum/pluginconf.d/priorities.conf

Add this line


$ sudo vi /etc/yum.conf 

Add this line


Check out vi commands if needed

Simple priority usage is by adding a line in each repo file

$ sudo vi /etc/yum.repos.d/<reponame>.repo

priority=1                       Greatest priority

priority=99                      Lowest priority

Any repo not assigned a priority number will default to 99.

But it can become a little more complex, see the link above.

You can play around with the priorities settings for the repos you have installed, with the more useful ones set at around 10-20 and the less used ones set at 40-50 & with the include an exclude flags.

Read the manual for additional yum commands as you proceed, especially the 'includepkgs=' and/or 'exclude=' options.

$ man yum
$ man yumdb
$ man yum.conf 

Centos Repos

You can search an invidual repos contents by disabling them all and enabling the one you want to view, first get a list of your installed repos, repolist may not list all of them so

$ yum repolist                  or if some are excluded

$ ls /etc/yum.repos.d/

$ yum --disablerepo=\* --enablerepo=nux-dextop list all

You can enable additional Centos repos in the base repo file

$ sudo vi /etc/yum.repos.d/CentOS-Base.repo

Scroll down, for example, to enable centosplus or contrib and set enabled to 1.

You can then set priorities on each with the exclude= command to filter out packages you don't require in a space separated list.

exclude=php* kernel* 
exclude=(exclude packages you dont want updating)



Centos 6/RHEL Priorities settings restrictions

Third Party Repos

Some of the third party repos which are available.


$ sudo  rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

(Same package for 64 bit)


$ sudo rpm --import http://puias.princeton.edu/data/puias/6/i386/os/RPM-GPG-KEY-puias  

(Same key for 64 bit)

$ sudo vi /etc/yum.repos.d/PUIAS_6_addons_2.repo    put in it

name=PUIAS addons Base $releasever - $basearch - 2


Remi (PHP related and others, must have Epel also)

$ sudo yum -y install wget
$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 
$ sudo rpm -Uvh remi-release-6.rpm


$ su -c 'yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'

(Enter password at prompt)

or go to http://rpmfusion.org/Configuration to find the current commands as they change often.


$ sudo rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org 

$ sudo  rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm


$ sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

$ sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm


$ sudo vi /etc/yum.repos.d/naulinux-school.repo

Enter into the file

name=NauLinux School

Save the file and run yum


$ sudo yum -y install wget                           
$ wget http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-1.el6.nux.noarch.rpm
$ wget http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-1.el6.nux.noarch.rpm

Then install the downloaded repo pack       


$ sudo rpm -Uvh nux-dextop-release-0-1.el6.nux.noarch.rpm  


Create a blank repo file

$ sudo vi /etc/yum.repos.d/virtualbox.repo

Enter into the file

name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox

Save the file and run yum 


 $ sudo rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms 

$ sudo rpm -Uvh http://packages.atrpms.net/dist/el6/atrpms-repo/atrpms-repo-6-6.el6.i686.rpm

$ sudo rpm -Uvh http://packages.atrpms.net/dist/el6/atrpms-repo/atrpms-repo-6-6.el6.x86_64.rpm

If you are not using priorities, disable them to avoid conflicts, but leave EPEL enabled.

As there will be more than one repo file just

$ yum repolist
$ sudo vi /etc/yum.repos.d/<repo_name>  (set enabled to 0)

To find out information on any available package just query it.

$ repoquery -i gedit          (search default repos)

$ repoquery -i --enablerepo=nux-dextop deluge (additional repo)

$ repoquery -i --repoid=nux-dextop deluge (just one repo)

 Name        : deluge
Version     : 1.3.3
Release     : 1.el6.nux
Architecture: noarch
Size        : 0
Packager    : http://li.nux.ro/
Group       : Applications/Internet
URL         : http://deluge-torrent.org/
Repository  : nux-dextop
Summary     : A GTK+ BitTorrent client with support for DHT, UPnP, and PEX
Source      : deluge-1.3.3-1.el6.nux.src.rpm
Description :
Deluge is a new BitTorrent client, created using Python and GTK+. It is
intended to bring a native, full-featured client to Linux GTK+ desktop
environments such as GNOME and XFCE. It supports features such as DHT
(Distributed Hash Tables), PEX (µTorrent-compatible Peer Exchange), and UPnP
(Universal Plug-n-Play) that allow one to more easily share BitTorrent data
even from behind a router with virtually zero configuration of port-forwarding.

You can also use 

$ yum list available gedit

$ yum list available | grep gedit

More examples of repoquery & yum
See the list of repoquery commands below.

Repoquery Options:

 --version             show program’s version number and exit

 -h, --help            show this help message and exit

 -l, --list            list files in this package/group

 -i, --info            list descriptive info from this package/group

 -f, --file            query which package provides this file

 --qf=QUERYFORMAT, --queryformat=QUERYFORMAT

                       specify a custom output format for queries

 --groupmember         list which group(s) this package belongs to

 -q, --query           no-op for rpmquery compatibility

 -a, --all             query all packages/groups

 -R, --requires        list package dependencies

 --provides            list capabilities this package provides

 --obsoletes           list other packages obsoleted by this package

 --conflicts           list capabilities this package conflicts with

 --changelog           show changelog for this package

 --location            show download URL for this package

 --nevra               show name-epoch:version-release.architecture info of


 --envra               show epoch:name-version-release.architecture info of


 --nvr                 show name, version, release info of package

 -s, --source          show package source RPM name

 --srpm                operate on corresponding source RPM

 --resolve             resolve capabilities to originating package(s)

 --alldeps             check non-explicit dependencies (files and Provides:)

                       as well, defaults to on

 --exactdeps           check dependencies exactly as given, opposite of


 --recursive           recursively query for packages (for whatrequires)

 --whatprovides        query what package(s) provide a capability

 --whatrequires        query what package(s) require a capability

 --whatobsoletes       query what package(s) obsolete a capability

 --whatconflicts       query what package(s) conflicts with a capability

 -g, --group           query groups instead of packages


                       filter which packages (all,optional etc) are shown

                       from groups

 --archlist=ARCHLIST   only query packages of certain architecture(s)


                       set value of $releasever in yum config and repo files


                       limit query to installed / available / recent /

                       updates / extras / all (available + installed)/

   repository (default) packages

--installed           limit query to installed pkgs only

 --show-duplicates     show all versions of packages

 --show-dupes          show all versions of packages

 --repoid=REPOID       specify a repo to query 


                       specify additional repos to query.


                       specify repos to disable


                       specify repoid & paths of additional repositories -

                       unique repoid and complete path required Example.


 --plugins             enable yum plugin support

 --quiet               quiet output, only error output to stderr (default


 --verbose             verbose output (opposite of quiet)

 -C, --cache           run from cache only

 --tempcache           use private cache (default when used as non-root)

 --querytags           list available tags in queryformat queries


                       config file location

 --tree-requires       list recursive requirements, in tree form

 --tree-conflicts      list recursive conflicts, in tree form

 --tree-obsoletes      list recursive obsoletes, in tree form

 --tree-whatrequires   list recursive what requires, in tree form

 --search              Use yum’s search to return pkgs


                       search fields to search using --search

Labels: , , ,