सक्षम कैसे करें, अक्षम करें और यम प्लग-इन स्थापित करें


YUM प्लग-इन छोटे प्रोग्राम हैं जो पैकेज मैनेजर के संपूर्ण प्रदर्शन को बढ़ाते हैं और सुधारते हैं। उनमें से कुछ डिफ़ॉल्ट रूप से स्थापित हैं, जबकि कई नहीं हैं। यम हमेशा आपको सूचित करता है कि कौन सा प्लग-इन, यदि कोई हो, लोड और सक्रिय हो जब भी आप कोई यम कमांड चलाते हैं।

इस छोटे से लेख में, हम समझाएंगे कि कैसे चालू या बंद करें और CentOS/RHEL वितरण में YUM पैकेज प्रबंधक प्लग-इन कॉन्फ़िगर करें।

सभी सक्रिय प्लग-इन देखने के लिए, टर्मिनल पर एक yum कमांड चलाएँ। नीचे दिए गए आउटपुट से, आप देख सकते हैं कि सबसे तेज़ प्लग-इन लोड है।

# yum search nginx

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

यम प्लग-इन को सक्षम करना

यम प्लग-इन को सक्षम करने के लिए, यह सुनिश्चित करें कि निर्देश <कोड> प्लगइन्स = 1 ( 1 अर्थ) [मुख्य] अनुभाग में मौजूद है। मजबूत> /etc/yum.conf फ़ाइल, जैसा कि नीचे दिखाया गया है।

# vi /etc/yum.conf

यम कॉन्फ़िगरेशन फ़ाइल

[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

यह विश्व स्तर पर यम प्लग-इन को सक्षम करने का एक सामान्य तरीका है। जैसा कि हम बाद में देखेंगे, आप उन्हें अपनी ग्रहणशील कॉन्फ़िगरेशन फ़ाइलों में व्यक्तिगत रूप से सक्षम कर सकते हैं।

YUM प्लग-इन को अक्षम करना

यम प्लग-इन को अक्षम करने के लिए, ऊपर दिए गए मान को 0 (अर्थ ऑफ) में बदल दें, जो विश्व स्तर पर सभी प्लग-इन को निष्क्रिय कर देता है।

plugins=0	

इस स्तर पर, यह ध्यान रखना उपयोगी है कि:

  • Since a few plug-ins (such as product-id and subscription-manager) offer fundamental yum functionalities, it is not recommended to turn off all plug-ins especially globally.
  • Secondly, disabling plug-ins globally is allowed as an easy way out, and this implies that you can use this provision when investigating a likely problem with yum.
  • Configurations for various plug-ins are located in /etc/yum/pluginconf.d/.
  • Disabling plug-ins globally in /etc/yum.conf overrides settings in individual configuration files.
  • And you can also disable a single or all yum plug-ins when running yum, as described later on.

अतिरिक्त यम प्लग-इन को स्थापित और कॉन्फ़िगर करना

आप इस कमांड का उपयोग करके सभी यम प्लग-इन और उनके विवरणों की एक सूची देख सकते हैं।

# yum search yum-plugin

Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * epel: www.mirrorservice.org
 * extras: mirror.sov.uk.goscomb.net
 * updates: mirror.sov.uk.goscomb.net
========================================================================= N/S matched: yum-plugin ==========================================================================
PackageKit-yum-plugin.x86_64 : Tell PackageKit to check for updates when yum exits
fusioninventory-agent-yum-plugin.noarch : Ask FusionInventory agent to send an inventory when yum exits
kabi-yum-plugins.noarch : The CentOS Linux kernel ABI yum plugin
yum-plugin-aliases.noarch : Yum plugin to enable aliases filters
yum-plugin-auto-update-debug-info.noarch : Yum plugin to enable automatic updates to installed debuginfo packages
yum-plugin-changelog.noarch : Yum plugin for viewing package changelogs before/after updating
yum-plugin-fastestmirror.noarch : Yum plugin which chooses fastest repository from a mirrorlist
yum-plugin-filter-data.noarch : Yum plugin to list filter based on package data
yum-plugin-fs-snapshot.noarch : Yum plugin to automatically snapshot your filesystems during updates
yum-plugin-keys.noarch : Yum plugin to deal with signing keys
yum-plugin-list-data.noarch : Yum plugin to list aggregate package data
yum-plugin-local.noarch : Yum plugin to automatically manage a local repo. of downloaded packages
yum-plugin-merge-conf.noarch : Yum plugin to merge configuration changes when installing packages
yum-plugin-ovl.noarch : Yum plugin to work around overlayfs issues
yum-plugin-post-transaction-actions.noarch : Yum plugin to run arbitrary commands when certain pkgs are acted on
yum-plugin-priorities.noarch : plugin to give priorities to packages from different repos
yum-plugin-protectbase.noarch : Yum plugin to protect packages from certain repositories.
yum-plugin-ps.noarch : Yum plugin to look at processes, with respect to packages
yum-plugin-remove-with-leaves.noarch : Yum plugin to remove dependencies which are no longer used because of a removal
yum-plugin-rpm-warm-cache.noarch : Yum plugin to access the rpmdb files early to warm up access to the db
yum-plugin-show-leaves.noarch : Yum plugin which shows newly installed leaf packages
yum-plugin-tmprepo.noarch : Yum plugin to add temporary repositories
yum-plugin-tsflags.noarch : Yum plugin to add tsflags by a commandline option
yum-plugin-upgrade-helper.noarch : Yum plugin to help upgrades to the next distribution version
yum-plugin-verify.noarch : Yum plugin to add verify command, and options
yum-plugin-versionlock.noarch : Yum plugin to lock specified packages from being updated

प्लग-इन स्थापित करने के लिए, पैकेज स्थापित करने के लिए उसी विधि का उपयोग करें। उदाहरण के लिए हम चेंजलॉग प्लग-इन स्थापित करेंगे, जिसका उपयोग अपडेट करने से पहले या बाद में पैकेज चैंज दिखाने के लिए किया जाता है।

# yum install yum-plugin-changelog 

एक बार जब आप स्थापित हो जाते हैं, तो changelog को इसकी कॉन्फ़िगरेशन फ़ाइल में देखने की पुष्टि करने के लिए डिफ़ॉल्ट रूप से सक्षम किया जाएगा।

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

अब आप इस तरह के पैकेज के लिए चैंज देख सकते हैं (इस मामले में httpd )।

# yum changelog httpd

Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirror.freethought-internet.co.uk
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com

Listing all changelogs

==================== Installed Packages ====================
httpd-2.4.6-45.el7.centos.4.x86_64       installed
* Wed Apr 12 17:30:00 2017 CentOS Sources <[email > - 2.4.6-45.el7.centos.4
- Remove index.html, add centos-noindex.tar.gz
- change vstring
- change symlink for poweredby.png
- update welcome.conf with proper aliases
...

कमांड लाइन में YUM प्लग-इन को अक्षम करें

जैसा कि पहले कहा गया है, हम इन दो महत्वपूर्ण विकल्पों का उपयोग करके एक yum कमांड को चलाते समय एक या एक से अधिक प्लग-इन को बंद कर सकते हैं।

  • --noplugins – turns off all plug-ins
  • --disableplugin=plugin_name – disables a single plug-ins

आप इस yum कमांड की तरह सभी प्लग-इन को डिसेबल कर सकते हैं।

# yum search --noplugins yum-plugin

अगला कमांड httpd पैकेज स्थापित करते समय प्लग-इन, सबसे तेज़ अक्षम करता है।

# yum install --disableplugin=fastestmirror httpd

Loaded plugins: changelog
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-45.el7.centos.4 will be updated
--> Processing Dependency: httpd = 2.4.6-45.el7.centos.4 for package: 1:mod_ssl-2.4.6-45.el7.centos.4.x86_64
---> Package httpd.x86_64 0:2.4.6-67.el7.centos.6 will be an update
...

अभी के लिए बस इतना ही! आप इन निम्नलिखित YUM संबंधित लेखों को पढ़ना पसंद कर सकते हैं।

  1. How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info
  2. How to Fix Yum Error: Database Disk Image is Malformed

इस गाइड में, हमने दिखाया कि कैसे CentOS/RHEL 7. में YUM पैकेज मैनेजर प्लग-इन को सक्रिय, कॉन्फ़िगर या निष्क्रिय करना है। इस लेख के बारे में कोई प्रश्न पूछने या अपने विचार साझा करने के लिए नीचे दिए गए टिप्पणी फ़ॉर्म का उपयोग करें।