CentOS, RHEL 또는 Amazon Linux를 실행 중인 Amazon EC2 인스턴스에 대해 EPEL 리포지토리를 활성화하려면 어떻게 해야 하나요?
최종 업데이트 날짜: 2022년 12월 20일
CentOS, Red Hat Enterprise Linux(RHEL) 또는 Amazon Linux 기반 배포를 실행하는 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스에서 엔터프라이즈 리눅스용 추가 패키지(EPEL) 리포지토리에 대한 액세스를 켜고 싶습니다.
간략한 설명
표준 리포지토리는 CentOS, RHEL 또는 Amazon Linux 기반 배포에 설치할 수 있는 일부 패키지를 제공하지 않을 수도 있습니다. EPEL 리포지토리를 켜면 패키지 설치에 대한 추가 옵션이 제공됩니다.
해결 방법
다음 단계에 따라 CentOS, RHEL, 또는 Amazon Linux 기반 배포에서 EPEL 리포지토리를 다운로드 및 설치하고 켭니다.
배포를 확인하려면 다음 명령을 실행합니다.
cat /etc/os-release
Amazon Linux
Amazon Linux 2:
RHEL 7용 EPEL 릴리스 패키지를 설치하고 EPEL 리포지토리를 켭니다.
sudo amazon-linux-extras install epel -y
RHEL
RHEL 8:
RHEL 8용 EPEL 릴리스 패키지를 설치합니다.
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
RHEL 7:
RHEL 7용 EPEL 릴리스 패키지를 설치하고 켭니다.
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
CentOS
CentOS 8:
RHEL 8용 EPEL 릴리스 패키지를 설치합니다. EPEL 및 PowerTools 리포지토리를 모두 켭니다. PowerTools 리포지토리에는 많은 EPEL 패키지에 필요한 개발 도구가 포함되어 있습니다.
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf config-manager --set-enabled PowerTools
CentOS 7:
EPEL 릴리스 패키지를 설치하고 켭니다. CentOS 7은 기본 리포지토리에 epel-release 패키지를 포함합니다.
sudo yum -y install epel-release
켜진 리포지토리 목록
EPEL 리포지토리가 켜졌는지 확인하려면 repolist 명령을 실행합니다.
sudo yum repolist