Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

세틀라이트 서버를 사용하지 않고 Red Hat Enterprise Linux 5, 6, 7 의 최신 업데이트 로컬 미러를 작성하는 방법

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat Network (RHN)
  • reposync

Issue

  • reposync 유틸리티는 무엇이며 어떻게 사용할 수 있습니까?
  • 세틀라이트 서버를 사용하지 않고 Red Hat Enterprise Linux 5, 6, 7 의 최신 업데이트 로컬 미러를 작성하는 방법은 무엇입니까?
  • 로컬에서 특정 채널로부터 모든 패키지/rpms 를 다운로드할 필요가 있습니다.

Resolution

Red Hat 은 RHN 으로부터 패키지들을 다운로드할 수 있는 reposync 라고 불리는 유틸리티를 제공합니다. 특정 채널로부터 모든 패키지들을 다운로드하기 위해 해당 시스템은 해당 채널에 등록되어야 합니다. 만일 시스템이 요구된 채널에 등록되어 있지 않다면 reposync 는 로컬 시스템상에서 해당 패키지들을 다운로드하고 동기화 하기 위해 사용될 수 없을 것입니다.

예: 만일 Red Hat Enterprise Linux 5 시스템을 rhel-i386-server-5 베이스 채널과 rhn-tools-rhel-i386-server-5 채널에 등록하면 reposync 는 오직 해당 두 채널로부터 컨텐츠를 동기화할 수 있습니다. 만일 해당 시스템에 등록되지 않은 rhel-i386-server-cluster-5 또는 다른 채널로부터 동기화할려고 하면 reposync 는 동작하지 않을 것입니다.

  • 우선 RHN 에 등록된 시스템상에서 "yum-utils" 와 "createrepo" 패키지들을 설치하여 주십시요:
    # yum install yum-utils createrepo
  • 다음으로 디렉토리에 패키지들을 다운로드하기 위하여 다음 명령어를 실행하여 주십시요:

NOTE: 해당 시스템이 현재 사용하고 있는 repo id 에 따라 --repoid=<REPO_ID> 를 변경하여 주십시요.

    # reposync --gpgcheck -l --repoid=channel-id
    예를 들어:
    # reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 \
           --download_path=/download/path

상기 명령어는 지정된 경로로 패키지들을 다운로드 할 것입니다. 다음으로 리포지토리를 생성하기 위해 다음 명령어들을 실행할 필요가 있습니다:

    # cd /var/www/html/<download directory>
    # createrepo -v /var/www/html/<download directory>/

동기화되고 있는 채널의 모든 메타데이터를 다운로드하기 위해 reposync 명령어에 '--download-metadata' and '--downloadcomps' 플래그를 사용하여 주십시요. 이는 yum 의 yum-security 또는 'groupinstall' 기능 사용 같은 다양한 플러그인을 사용하는 것을 허가할 것입니다.

    # reposync --gpgcheck -l --repoid=channel-id --downloadcomps --download-metadata
    예를 들어:
    # reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 \
           --download_path=/download/path --downloadcomps --download-metadata

새롭게 동기화된 repo 의 그룹 데이터에 접근하기 위해 createrepo 명령어를 다음과 같이 실행하여 주십시요:

    # cd /var/www/html/<download directory>
    # createrepo -v  /var/www/html/<download directory>/ -g comps.xml
  • 다음으로 해당 리포지토리를 사용해서 업데이트 하기 원하는 클라이언트 시스템상에 리포지토리를 설정하여 주십시요.

NOTE: reposync 유틸리티는 해당 시스템이 등록된 채널을 위한 로컬 미러를 작성할 것입니다.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments