enable, disable & install yum plugins

How to Enable, Disable & Install Yum Plugins

YUM plugins are small programs that improve overall performance of package manager. Some are already present on your system, along with YUM. When you run YUM command, it notifies you about the plugins that are already loaded and active on your system.


How to Enable, Disable & Install Yum Plugins

You can see all active plugins using yum search command. Here is an example.

# yum search nginx

Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
...


Enable Yum Plugins

You can easily enable YUM plugins by setting the plugins variable to 1, in yum configuration file, under [main] section.

# vi /etc/yum.conf

Here is an example.

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1 
installonly_limit=5

Save and close the file, to apply changes. This will apply changes globally for all packages. We will also learn how to individually set this configuration for each package.


Disable Yum Plugins

To disable Yum plugins, just set the above plugins variable to 0 in your Yum configuration file. Please note, when you do this, it will disable all yum plugins, which may not be desirable. If you want to disable plugins for specific packages, you will find them in /etc/yum/pluginconf.d/.

Also, when you disable plugins globally, it overrides the package specific changes made in /etc/yum/pluginconf.d/.

You can also disable yum plugins using command line options such as –no-plugins and –disableplugin=plugin_name.

Here is the command to disable all plugins.

# yum search --noplugins yum-plugin

Here is the command to disable a particular plugin fastestmirror while installing httpd package using yum command.

# yum install --disableplugin=fastestmirror httpd


Install & Configure Extra Plugins

To get a list of all Yum plugins and their description, run the following command.

# yum search yum-plugin

You can install a specific plugin with the ‘yum install’ command.

# yum install yum-plugin-changelog 

Once you have installed this plugin, you can use it to view a package’s changelog, with the following command.

# yum changelog httpd

If you want to change the configuration file for this plugin, open it using the following command.

# vi /etc/yum/pluginconf.d/changelog.conf

In this article, we have learnt how to enable, disable & install yum plugins in Linux.

Also read:

How to Check if Element is Visible in Viewport
How to Check if Element is Hidden in JavaScript
How to Stay on Same Tab After Page Refresh
How to Select Element By Text in JavaScript
How to Select Element By Name in JavaScript

Leave a Reply

Your email address will not be published.