include("site.inc"); $template = new Page; $template->initCommon(); $template->displayHeader(); ?>
To change the behavior of yum
, you may either
edit the configuration files, or install
plugins. Plugins enable developers to add
new features to yum
.
The file /etc/yum.conf
provides the main
configuration for yum
. Settings in a
repository definition file override the main configuration for
those operations that use the defined repository.
To edit /etc/yum.conf
, run a text editor
with root
privileges.
This command opens /etc/yum.conf
with
gedit, the default text editor for
Fedora desktop systems:
su -c 'gedit /etc/yum.conf'
Enter the password for the
root
account when
prompted.
The main configuration file provides the settings that apply to
all yum
operations. These include caching
options, and proxy server settings. The directory
/etc/yum.repos.d/
holds definition files
for each repository that yum
uses. Plugins
use the configuration files in the directory
/etc/yum/pluginconf.d/
.
The following sections in this document provide further
information on configuring yum
:
Further Documentation | |
---|---|
Refer to the |
Each yum
plugin is a single file, written in
the Python programming language. You may download plugins from
the yum
project Web site, or from third-party
providers. The yum
project maintains a list
of plugins on the page
http://wiki.linux.duke.edu/YumPlugins.
Plugin File Extension | |
---|---|
The names of |
To install a plugin, copy it to the directory
/usr/lib/yum-plugins/
. Create a
configuration file for the plugin in the directory
/etc/yum/pluginconf.d/
. Save the
configuration file with the same name as the plugin, but with
the extension .conf
.
root Privileges Required | |
---|---|
You must have |
For example, to copy the plugin
exampleplugin.py
, enter the command:
su -c 'cp exampleplugin.py /usr/lib/yum-plugins/'
Enter the password for the
root
account when
prompted.
You may then create a configuration file for the plugin with a text editor. This example uses gedit, the default text editor for Fedora desktop systems:
su -c 'gedit /etc/yum/pluginconf.d/exampleplugin.conf'
Enter the password for the
root
account when
prompted.
Each plugin configuration file includes the
enabled
setting. Some plugins also require
additional settings. To determine the correct settings, either
refer to the documentation supplied with the plugin, or read the
plugin file itself with any text editor.
To remove a plugin, delete both the original file and the
automatically generated bytecode file from
/usr/lib/yum-plugins/
. The bytecode file
uses the same name as the plugin, but has the extension
.pyc
. Remove the relevant configuration
file in /etc/yum/pluginconf.d/
.
This command removes the plugin
exampleplugin
:
su -c 'rm -f /etc/yum/pluginconf.d/exampleplugin.conf; rm -f /usr/lib/yum-plugins/exampleplugin.py*'
Enter the password for the
root
account when
prompted.