16.2. 원격 리포지터리 생성

여러 Red Hat Enterprise Linux 서버가 네트워크의 단일 Red Hat Enterprise Linux 리포지토리에 액세스할 수 있습니다. 이 경우 실행 중인 웹 서버가 필요합니다. 대부분의 경우 Apache가 됩니다.

사전 요구 사항

  • Red Hat Enterprise Linux 8 설치 DVD/ISO 이미지가 있습니다.
  • Red Hat Enterprise Linux를 실행하는 여러 서버가 있습니다.

절차

  1. 다운로드한 DVD의 내용을 마운트 및 복사합니다.

    mkdir /mnt/rhel{ProductNumber}
    mount -o loop,ro rhel-{ProductNumber}-x86_64-dvd.iso /mnt/rhel{ProductNumber}/
    cp -r /mnt/rhel{ProductNumber}/ /var/www/html/
    umount  /mnt/rhel{ProductNumber}

    다음 단계는 Apache가 설치된 서버에서 실행되지 않고 클라이언트 측에서 수행됩니다.

  2. BaseOS 및 AppStream 리포지토리 모두에 대한 리포지토리 파일을 생성합니다.

    vi /etc/yum.repos.d/rhel_http_repo.repo
    
    [BaseOS_repo_http]
    name=RHEL_8_x86_64_HTTP BaseOS
    baseurl="http://myhost/rhel8/BaseOS"
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [AppStream_repo_http]
    name=RHEL_8_x86_64_HTTP AppStream
    baseurl="http://myhost/rhel8/AppStream"
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [root@localhost ~]# yum repolist
    Updating Subscription Management repositories.
    Unable to read consumer identity
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Last metadata expiration check: 0:08:33 ago on Út 23. července 2019, 16:48:09 CEST.
    repo id                                                              repo name                                                                        status
    AppStream_repo_http                                                  RHEL_8_x86_64_HTTP AppStream                                                   4,672
    BaseOS_repo_http                                                     RHEL_8_x86_64_HTTP BaseOS                                                      1,658
    [root@localhost ~]#