検索

14.5. カスタムファイルタイプリポジトリーからホストにファイルをダウンロードする

download PDF

curl -O を使用して HTTPS 経由でクライアントにファイルをダウンロードできます。また、リポジトリーの Unprotected オプションが選択されている場合は、オプションで HTTP 経由でもダウンロードできます。

前提条件

手順

  1. Satellite Web UI で、Content > Products に移動します。
  2. カスタム製品の名前を選択します。
  3. ファイルタイプリポジトリーの名前を選択します。
  4. Unprotected チェックボックスを選択して、HTTP 経由で公開されているリポジトリーにアクセスしてください。
  5. Published At URL をコピーします。
  6. クライアントで、Satellite Server からファイルをダウンロードします。

    • HTTPS の場合:

      # curl \
      --cacert ./_katello-server-ca.crt \
      --cert ./_My_Organization_key-cert.pem \
      --remote-name \
      https://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File
    • HTTP の場合:

      # curl \
      --remote-name \
      http://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File

CLI 手順

  1. ファイルタイプリポジトリーをリスト表示します。

    # hammer repository list --content-type file
    ---|------------|-------------------|--------------|----
    ID | NAME       | PRODUCT           | CONTENT TYPE | URL
    ---|------------|-------------------|--------------|----
    7  | My_Files   | My_File_Product   | file         |
    ---|------------|-------------------|--------------|----
  2. リポジトリー情報を表示します。

    # hammer repository info \
    --name "My_Files" \
    --organization-id My_Organization_ID \
    --product "My_File_Product"

    Unprotected が有効になっている場合、出力は次のようになります。

    Publish Via HTTP: yes
    Published At:       https://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_File_Product_Label/My_Files_Label/

    Unprotected が有効になっていない場合、出力は次のようになります。

    Publish Via HTTP: no
    Published At:       https://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_File_Product_Label/My_Files_Label/
  3. クライアントで、Satellite Server からファイルをダウンロードします。

    • HTTPS の場合:

      # curl \
      --cacert ./_katello-server-ca.crt \
      --cert ./_My_Organization_key-cert.pem \
      --remote-name \
      https://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File
    • HTTP の場合:

      # curl \
      --remote-name \
      http://satellite.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.