LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Should I use yum-plugin-priorities? (https://www.linuxquestions.org/questions/linux-newbie-8/should-i-use-yum-plugin-priorities-4175466500/)

NotionCommotion 06-18-2013 10:31 AM

Should I use yum-plugin-priorities?
 
I am a novice with a CentOS 6.4 webserver.

Would you recommend I install yum-plugin-priorities? Why? The reason I ask is there are mixed messages on the Internet, however, maybe they are outdated.

Thanks

szboardstretcher 06-18-2013 10:46 AM

Plenty of info about this. But short answer is, yum priorites is a good idea to set up when using Rpmgforge, rpmfusion and epel at the same time.

Good explanation of it:
http://wiki.centos.org/PackageManagement/Yum/Priorities

Example how to use it:
http://unix.stackexchange.com/questi...-the-same-time

Madhu Desai 06-18-2013 11:16 AM

Personally, I don’t like yum-priorities. I want to manage (prioritize) packages my self. Although I have many repositories like epel, rpmforge, remi etc, for all of them I have set enabled=0. Only repositories that are enabled by default are the ones provided by CentOS. Also, I have set-up local repositories from both DVDs, so that every-time I install any package, it wont go looking for internet (Base Repo) for dependency. Since RPMs from CentOS Base repository and both DVDs are same (Total of 6383 RPMs), I have even disabled Base Repository. One advantage from this is that, when installing any package through yum, you don’t have to download all the dependencies as most of them are already available in local repository. This saves a lot of bandwidth.

So, whenever I want to install any package, I goto pkgs.org, search for package, look for latest versions provided by different repositories, and only enable that repositories (--enablerepo=<repo_name>) from which I want to install. That way only repositories that are open are local + CentOS + specific 3rd party. This is done to avoid version conflict which also leads to broken packages.

For some specific needs, I have set dedicated repositories. For example, for all my video/audio needs I only install from ATRPMS repo, which has latest packages.

Here I want to remind you that this the CentOS box I’m using at my home. At workplace, we have RHEL6, and we are not allowed to use any third party repositories, only RHN. We are not even allowed to update kernel, and if any enhancement are to be made, we should write our own script based on whatever built-in commands rhel provides.

NotionCommotion 06-18-2013 11:21 AM

Thanks mddesai, Why do you not like yum-priorities? Just because you want to manage it yourself, or is there additional reasons?

DavidMcCann 06-18-2013 11:36 AM

mddesai's approach involves checking which repository has the item you want and then enabling and disabling repos, which seems like a lot of trouble. It may save bandwidth, but that's only of interest in places where broadband is expensive or even unavailable.

And what if the repository you've enabled replaces a library you have already installed with a new version that breaks something? CentOS recommend Priorities (or ProtectBase) for a reason. If you're using a distro, take the advice of its developers: they know what they're talking about.

Madhu Desai 06-18-2013 01:19 PM

Quote:

Originally Posted by NotionCommotion (Post 4974232)
Why do you not like yum-priorities? Just because you want to manage it yourself, or is there additional reasons?

Yes, I simply like to manage stuff myself. Its not that I don’t like yum-priorities – I should have used 'wont prefer' instead. :)

Quote:

Originally Posted by DavidMcCann (Post 4974239)
mddesai's approach involves checking which repository has the item you want and then enabling and disabling repos, which seems like a lot of trouble. It may save bandwidth, but that's only of interest in places where broadband is expensive or even unavailable.

And what if the repository you've enabled replaces a library you have already installed with a new version that breaks something? CentOS recommend Priorities (or ProtectBase) for a reason. If you're using a distro, take the advice of its developers: they know what they're talking about.

Why is that a lot of trouble? After all how many packages do one will install on server. Given that only few packages will be installed on server, and that too on very good interval, isn’t it a good idea to check whats available before install?

You are right about bandwidth. But what about time it takes to download and install? Why bother going to internet when you already have RPMs. What-if the user is a newbie and he is learning package management – installing/uninstalling/modifying packages... very often... Of-course, you need to have both DVDs on hand, else there is no point.

Regarding breaking something, isn't it the exact reason why you want to do it manually to see what breaks what before install? I did set yum-priorities before, but ran into some problems... may be I didn’t set it properly, not sure about that. But the basic problem is - how do you decide which repository gets highest priority and which one with less priority? What if the repository with lowest priority you have set has come-up with latest package? You end up with installing old package from the repository you have set with highest priority.

I'm not sure about recommendation, but definitely agree - “yum priority plugins are useful tool if properly configured”.

"The upstream maintainer of yum, Seth Vidal, had the following to say about 'yum priorities' in September 2009:
Gosh, I hope people do not set up yum priorities. There are so many things about priorities that make me cringe all over. It could just be that it reminds me of apt 'pinning' and that makes me want to hurl."


if I’m wrong anywhere, please let me know.

John VV 06-18-2013 01:58 PM

yum-priorities dose take a bit of time to get used to and configure

there is no real documentation on just what each repo should be set at for any combination of installed repos and programs that are installed

But after a bit of time one dose get a "feel" for it

Now in RHEL6 the situation is A LOT BETTER than it was in RHEL5
in rhel5 it was a 100% NEEDED !!!! tool .
I use it on SL6.4 - mostly for multimedia programs in rpmforge

So while the repos in rhel6 ARE better ,there can still be issues .

so for now use that plugin

DavidMcCann 06-19-2013 10:44 AM

It's true that the priorities need to be set in the correct order. I have 1 for CentOS, 2 for EPEL, and 3 for RPMforge. At first I put EPEL and RPMforge the other way round and something wouldn't install.

John VV 06-19-2013 01:30 PM

i set it like this
sl.repo = priority=10( xorg excluded - for compatibility for OLD hardware )
sl6.3.repo = priority=10
elrepo.repo = priority=20
epel.repo = priority=30
rpmforge.repo =enabled=0 , priority=40
adobe-linux-i386.repo = priority=50

Madhu Desai 06-20-2013 02:30 AM

Somehow I prefer doing it manually. I have disabled all repositories including [base] from centos. The only repositories that are enabled are – local and centos. This way when I update or install any package (most of them), it comes from centos native repository. I only use 3rd party when its not available in centos native repository. If i have access to browser, i goto pkgs.org, or just use commandline to check package versions and their providers.

Also i have prefixed 'x-' to my 3rd party repositories, as using "*" metachar will start searching around 15-20 extra repos (from CentOS-Debuginfo, CentOS-Media and CentOS-Vault), which takes very long time to search.

All Repos:
Code:

# ls *.repo -w 90
CentOS-Base.repo      x-adobe.repo        x-google-chrome.repo  x-virtualbox.repo
CentOS-Debuginfo.repo  x-atomic.repo        x-linuxtech.repo      x-webtatic.repo
CentOS-Media.repo      x-atrpms.repo        x-nux-dextop.repo
CentOS-Vault.repo      x-epel.repo          x-remi.repo
myrepo.repo            x-epel-testing.repo  x-rpmforge.repo

Active Repos:
Code:

# yum repolist
repo id                    repo name                                status
centosplus                  CentOS-6 - Plus                          42
extras                      CentOS-6 - Extras                        12
myrepo                      Local CentOS-6.4 x86_64 Repository      6,366+15
updates                    CentOS-6 - Updates                      782+30
repolist: 7,202

Search for package in all Repos (total hits 27. truncated for readability):
Code:

# yum provides vlc --enablerepo="x-*"

vlc-1.1.11-1.el6.nux.x86_64 : The cross-platform open-source multimedia framework, player and server
Repo        : x-nux-dextop
Matched from:

vlc-1.1.11-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone video player
Repo        : x-rpmforge
Matched from:

vlc-1.1.11-72.el6.x86_64 : A free and cross-platform media player
Repo        : x-atrpms
Matched from:

vlc-2.0.7-8.el6.x86_64 : A free and cross-platform media player
Repo        : x-atrpms
Matched from:

{{Truncated}}

# yum provides vlc --enablerepo="x-*" | grep 'vlc-'
vlc-1.1.11-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.11-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone
vlc-1.1.11-72.el6.x86_64 : A free and cross-platform media player
vlc-1.1.9-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone
vlc-1.1.10-71.el6.x86_64 : A free and cross-platform media player
vlc-2.0.7-8.el6.x86_64 : A free and cross-platform media player
vlc-2.0.4-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-2.0.5-6.el6.x86_64 : A free and cross-platform media player
vlc-1.1.13-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone
vlc-2.0.5-2.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-2.0.5-8.el6.i686 : Video Lan Client - a multimedia player, streamer and
vlc-1.1.9-69.el6.x86_64 : A free and cross-platform media player
vlc-1.1.13-5.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.8-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone
vlc-2.0.6-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.10-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.13-4.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.12-73.el6.x86_64 : A free and cross-platform media player
vlc-1.1.12-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.13-2.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-2.0.4-2.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-2.0.5-8.el6.x86_64 : Video Lan Client - a multimedia player, streamer and
vlc-2.0.6-7.el6.x86_64 : A free and cross-platform media player
vlc-1.1.6-1.el6.rf.x86_64 : The VideoLAN client, also a very good standalone
vlc-2.0.3-3.el6.x86_64 : A free and cross-platform media player
vlc-2.0.3-1.el6.nux.x86_64 : The cross-platform open-source multimedia
vlc-1.1.5-2.el6.rf.x86_64 : The VideoLAN client, also a very good standalone

Directly query who has the latest:
Code:

# yum list available vlc --enablerepo="x-*"

Available Packages
vlc.i686            2.0.5-8.el6              x-linuxtech
vlc.x86_64          2.0.7-8.el6              x-atrpms 

Install latest package:
Code:

# yum install vlc --enablerepo="x-atrpms"

Dependencies Resolved

==============================================================================================
 Package                        Arch              Version            Repository      Size
==============================================================================================
Installing:
 vlc                            x86_64            2.0.7-8.el6        x-atrpms        11 M
Updating for dependencies:
 libebml                        x86_64            1.3.0-1.el6        x-atrpms        66 k
 libmatroska                    x86_64            1.4.0-0_2.el6      x-atrpms        133 k

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

Total download size: 11 M
Is this ok [y/N]:



All times are GMT -5. The time now is 06:53 AM.