웹사이트 검색

Yum 플러그인을 활성화, 비활성화 및 설치하는 방법


YUM 플러그인은 패키지 관리자의 전반적인 성능을 확장하고 향상시키는 작은 프로그램입니다. 그 중 일부는 기본적으로 설치되지만 대부분은 그렇지 않습니다. Yum은 yum 명령을 실행할 때마다 어떤 플러그인이 로드되어 활성화되어 있는지 항상 알려줍니다.

이 짧은 기사에서는 CentOS/RHEL 배포판에서 YUM 패키지 관리자 플러그인을 켜거나 끄고 구성하는 방법을 설명합니다.

모든 활성 플러그인을 보려면 터미널에서 yum 명령을 실행하세요. 아래 출력에서 fastestmirror 플러그인이 로드된 것을 확인할 수 있습니다.

yum search nginx

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

YUM 플러그인 활성화

Yum 플러그인을 활성화하려면 plugins=1(1은 켜짐을 의미) 지시어가 <의 [main] 섹션 아래에 있는지 확인하세요. Strong>/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 플러그인을 활성화하는 일반적인 방법입니다. 나중에 살펴보겠지만, 수용 구성 파일에서 개별적으로 활성화할 수 있습니다.

YUM 플러그인 비활성화

Yum 플러그인을 비활성화하려면 위의 값을 0(해제를 의미)으로 변경하면 모든 플러그인이 전역적으로 비활성화됩니다.

plugins=0	

이 단계에서는 다음 사항에 유의하는 것이 유용합니다.

  • 일부 플러그인(예: product-idsubscription-manager)은 기본적인 Yum 기능을 제공하므로 특히 전역적으로 모든 플러그인을 끄는 것은 권장되지 않습니다.
  • 둘째, 플러그인을 전역적으로 비활성화하는 것은 쉬운 방법으로 허용되며 이는 yum에서 발생할 수 있는 문제를 조사할 때 이 조항을 사용할 수 있음을 의미합니다.
  • 다양한 플러그인에 대한 구성은 /etc/yum/pluginconf.d/에 있습니다.
  • /etc/yum.conf에서 전역적으로 플러그인을 비활성화하면 개별 구성 파일의 설정이 무시됩니다.
  • 또한 나중에 설명하는 대로 yum을 실행할 때 단일 또는 모든 yum 플러그인을 비활성화할 수도 있습니다.

추가 YUM 플러그인 설치 및 구성

이 명령을 사용하면 모든 yum 플러그인 목록과 해당 설명을 볼 수 있습니다.

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

플러그인을 설치하려면 패키지 설치와 동일한 방법을 사용하십시오. 예를 들어 업데이트 전/후에 패키지 변경 로그를 표시하는 데 사용되는 changelog 플러그인을 설치합니다.

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 – 모든 플러그인을 끕니다.
  • --disableplugin=plugin_name – 단일 플러그인을 비활성화합니다.

이 yum 명령에서와 같이 모든 플러그인을 비활성화할 수 있습니다.

yum search --noplugins yum-plugin

다음 명령은 httpd 패키지를 설치하는 동안 fastestmirror 플러그인을 비활성화합니다.

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. 'Yum History'를 사용하여 설치 또는 제거된 패키지 정보를 찾는 방법
  2. Yum 오류 수정 방법: 데이터베이스 디스크 이미지의 형식이 잘못되었습니다.

이 가이드에서는 CentOS/RHEL 7에서 YUM 패키지 관리자 플러그인을 활성화, 구성 또는 비활성화하는 방법을 보여주었습니다. 아래 의견 양식을 사용하여 이 기사에 대한 질문을 하거나 의견을 공유하세요.