Thursday, May 17, 2012

YUM plug-ins to control package versions

1) versionlock


- How to install it?


#yum install yum-plugin-versionlock


- The next step is to use the versionlock plug-in to create its file of package versions.


#yum versionlock \*


- Now, if you try to install updates they will be rejected. So how do you update?


- Update the package version in the version list file, /etc/yum/pluginconf.d/versionlock.list, and then run


#yum upgrade


- To add files that you want version locked, use the following yum command:


#yum versionlock [package-name]


Versionlock allows you specify what version of a package should be installed. You can find out more about it in the baseurl.org yum wiki - http://yum.baseurl.org/wiki/Faq


2) allow-downgrade


if you've already installed a newer version of the package, you'll have to downgrade it. In that case, make sure you've got yum's downgrade plugin installed:


- If you're downgrading, you may need to throw in the --allow-downgrade flag.


# yum --allow-downgrade install php-gd-5.2.6