yum 리포지토리 활성/비활성 확인하기

linux Linux

시스템에 등록한 리포지토리는 활성과 비활성의 2가지 상태로 존재합니다. yum 명령을 사용하여 설치된 리포지토리의 상태를 확인할 수 있습니다. 또한 설치된 리포지토리의 상태를 “활성->비활성” , “비활성->활성”으로 상태를 변경할 수도 있습니다. yum 명령을 수행하는 그 시점에만 특정 리포지토리의 상태를 바꿔 지정해서 수행하는 방법도 설명하겠습니다.

yum 리포지토리의 설명은 다음 글을 읽어주십시오.

눈깨비 정보창고 - 분기탱천
마우스 영역 지정 이미지 캡처를 문자 인식 및 번역하기 버튼 클릭 만으로  을 실행 해 주는 소프트웨어를 작성 했습니다. 자세한 도움말은 여기를 참조 하십시오. 웹 서비스 구축 눈깨비가 본업으로 하고 있는 기술적인 ...

리포지토리 상태 확인 명령

시스템에 등록한 리포지토리는 다음 3개의 옵션으로 확인할 수 있습니다.

$ yum repolist all
$ yum repolist enabled
$ yum repolist disabled

옵션 지정 리포지토리 상태 확인 예

각 옵션의 대한 설명은 다음과 같습니다.

옵션설명
all시스템에 등록한 모든 리포지토리를 표시합니다.
enabled활성 상태의 리포지토리만 표시합니다.
disabled비활성 상태의 리포지토리만 표시합니다.

모든 리포지토리 표시

$ yum repolist all
...중간생략...
repo id                 repo name                                                   status
...중간생략...
C7.0.1406-base/x86_64   CentOS-7.0.1406 - Base                                      disabled
!base/7/x86_64          CentOS-7 - Base                                             enabled: 10,072
...중간생략...
!epel/x86_64            Extra Packages for Enterprise Linux 7 - x86_64              disabled
...중간생략...
!extras/7/x86_64        CentOS-7 - Extras                                           enabled:    453
...중간생략...
!remi                   Remi's RPM repository for Enterprise Linux 7 - x86_64       disabled
updates-source/7        CentOS-7 - Updates Sources                                  disabled
repolist: 13,464

활성 리포지토리 표시

$ yum repolist enabled

...중간생략...
repo id             repo name             status
!base/7/x86_64      CentOS-7 - Base       10,072
!extras/7/x86_64    CentOS-7 - Extras        453
...중간생략...
!updates/7/x86_64   CentOS-7 - Updates     1,687
repolist: 13,464

비활성 리포지토리 표시

$ yum repolist disabled
repo id                repo name
C7.0.1406-base/x86_64  CentOS-7.0.1406 - Base
...중간생략...
!epel/x86_64           Extra Packages for Enterprise Linux 7 - x86_64
...중간생략...
!remi                  Remi's RPM repository for Enterprise Linux 7 - x86_64
...중간생략...
!remi-php73            Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64
...중간생략...
!remi-php74            Remi's PHP 7.4 RPM repository for Enterprise Linux 7 - x86_64
...중간생략...
updates-source/7       CentOS-7 - Updates Sources
repolist: 0

지정 리포지토리 상세 내용을 표시

다음은 base 리포지토리의 상세 정보를 표시하는 명령입니다. -v 옵션으로 상세 정보를 표시 합니다.

$ yum repolist base -v
Loading "fastestmirror" plugin
Config time: 0.006
Yum version: 3.4.3
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Setting up Package Sacks
pkgsack time: 0.007
Repo-id      : base/7/x86_64
Repo-name    : CentOS-7 - Base
Repo-status  : enabled

Repo-revision: 1604001756
Repo-updated : Fri Oct 30 05:03:00 2020
Repo-pkgs    : 10,072
Repo-size    : 8.9 G
Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=genclo
Repo-baseurl : http://d36uatko69830t.cloudfront.net/centos/7/os/x86_64/ (1 more)
Repo-expire  : 21,600 second(s) (last: Tue Mar  2 16:01:35 2021)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo

repolist: 10,072

제목과 URL을 복사했습니다