RHEL7: How to get started with yum plugins.

Share this link

Presentation of yum plugins

The yum package manager can see its features enhanced through plugins.
To allow these plugins to work, the plugins variable needs to be set to 1 in the /etc/yum.conf file but it is the default value. Plugin configurations are stored in the /etc/yum/pluginconf.d directory. In this directory, any plugin can be enabled/disabled by assigning 1/0 to the enabled variable located in its configuration file.

Adding a new yum plugin is like installing any package.
Unfortunately, all the yum plugin packages don’t follow the same convention: most are called yum-plugin-name but some are named yum-name.

The yum-utils package is not really a plugin but it brings many useful tools to the yum package manager: package-cleanuprepoquery, reposyncyum-complete-transactionyum-config-manageryum-groups-manager, yumdbyumdownloader, etc.

By default, yum comes with two already enabled plugins: fastestmirror and langpacks.

# yum update
Loaded plugins: fastestmirror, langpacks
...

As there are more than 20 existing yum plugins, only some of them will be presented below.

Plugin Selection

changelog

Package name: yum-plugin-changelog
Function: add the –changelog option or the changelog subcommand displaying information about changelog.
Internal parameters:

  • when String: set to ‘pre‘ or ‘post‘ to see changes before or after transaction (‘pre‘ by default)
  • always Boolean: set to true, to always get the output (removes the cmd line arg) (false by default).

Subcommands:

  • yum changelog httpd displays the changelog of the httpd package.
  • yum changelog 5 httpd displays the last 5 changes of the httpd package.
  • yum update –changelog shows all the changes coming with the update.

fastestmirror

Package name: yum-plugin-fastestmirror
Function: sorts each repository’s mirrorlist according to connection speed before starting any download. Mirror sites and their associated connection speeds are stored in a cache.
Internal parameters:

  • verbose Boolean: 0/false means minimal display, 1/true produces additional messages (0/false by default).
  • always_print_best_host Boolean: this defines whether the best mirror is shown or not (true by default).
  • socket_timeout Integer: it is the default timeout for a socket connection (3 seconds by default).
  • hostfilepath String: this is the path to the plugin’s cache file (‘timedhosts‘ by default), you need to add /var/cache/yum/x86_64/7 to get the complete path.
  • maxhostfileage Integer: this represents the maximum age of the plugin’s cache file (10 days by default).
  • loadcache Boolean: this defines whether fastest mirrors are loaded from plugin’s cache or not (false by default).
  • maxthreads Integer: this is the biggest number of threads used in parallel (15 by default).
  • exclude String: this defines a comma separated list of mirror sites to exclude (none by default).
  • include_only String: this defines a comma separated list of mirror to include (none by default).
  • prefer Boolean: this specifies whether a preferred mirror exists or not (‘no.prefer.mirror‘ by default).
  • downgrade_ftp Boolean: this defines whether ftp sites come first or not (true by default).

Subcommands: none

langpacks

Package name: yum-langpacks
Function: add support for automatic and manual installation of langpacks. Read yum group metadata, install/remove language packs according to the languages set.
Internal parameters:

  • langpack_locales String: this defines the locale used.

Subcommands:

  • yum langavailable lists the available language packs.
  • yum langinfo lists information about particular language packs.
  • yum langinstall installs language packs.
  • yum langlist prints the installed language packs.
  • yum langremove removes language packs.

yum-plugin-priorities

Package name: yum-plugin-priorities
Function: allows repositories to have different priorities. Packages in a repository with a lower priority can’t be overridden by packages from a repository with a higher priority even if the repository has a later version. Priority are assigned to each repository in its associated repository file through the priority variable (99 by default, 0 being the highest priority).
An example of priorities assigned in the various repository files could be:

[base]       -> priority=1
[updates]    -> priority=1
[centosplus] -> priority=2
[extras]     -> priority=3
[epel]       -> priority=11

Internal parameters:

  • check_obsoletes Boolean: if set to 1, protect high-priority repositories against obsolete packages in low-priority repositories (0 by default).
  • only_samearch Boolean: if set to 1, excludes packages from lower priority repositories based on the package name and architecture; if set to 0, excludes based on the package name (0 by default).

Subcommands: none

Note: The yum –showduplicates list myrpm command can help you find the duplicated packages (here for myrpm).

yum-plugin-versionlock

Package name: yum-versionlock
Function: takes a set of name/versions for packages and excludes all other versions of those packages.  This allows you to protect packages from being updated by newer versions.
Internal parameters:

  • follow_obsoletes Boolean: if set to 1, look at all the obsoletes and see if any of the packages specified have an obsoleter (0 by default).
  • locklist String: this defines the file where all the version lock information is stored (/etc/yum/pluginconf.d/versionlock.list by default).

Subcommands:

  • yum versionlock add httpd forbids an upgrade of the httpd package.
  • yum versionlock list displays the list of all the packages that can’t be upgraded.
  • yum versionlock delete httpd allows an upgrade of the httpd package again.
  • yum versionlock clear allows an upgrade of all the packages again.

Additional Resources

You can also read the RHEL 6 Deployment Guide or explore the yum website.

(3 votes, average: 5.00 out of 5)
Loading...

Upcoming Events (Local Time)

There are no events.

Follow me on Twitter

Archives

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |