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 |
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 |
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. |
Thanks mddesai, Why do you not like yum-priorities? Just because you want to manage it yourself, or is there additional reasons?
|
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. |
Quote:
Quote:
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. |
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 |
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.
|
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 |
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 Code:
# yum repolist Code:
# yum provides vlc --enablerepo="x-*" Code:
# yum list available vlc --enablerepo="x-*" Code:
# yum install vlc --enablerepo="x-atrpms" |
All times are GMT -5. The time now is 06:53 AM. |