19.3. runlabel を使用した support-tools の実行


rhel10/support-tools コンテナーイメージは、support-toolsd デーモンのコンテナー化されたバージョンを実行するために作成されます。support-tools イメージには、installrununinstall という runlabel が含まれています。次の手順では、support-tools イメージのインストール、実行、およびアンインストールを説明します。

前提条件

  • container-tools メタパッケージがインストールされている。

手順

  1. support-tools イメージをプルします。

    # podman pull registry.redhat.io/rhel10/support-tools
    Copy to Clipboard Toggle word wrap
  2. support-toolsinstall runlabel を表示します。

    # podman container runlabel install --display rhel10/support-tools
    command: podman run --rm --privileged -v /:/host -e HOST=/host -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools registry.redhat.io/rhel10/support-tools:latest /bin/install.sh
    Copy to Clipboard Toggle word wrap

    これは、コマンドがホストに特権を開き、コンテナー内の /host にホストの root ファイルシステムをマウントし、install.sh スクリプトを実行します。

  3. support-toolsinstall runlabel を実行します。

    # podman container runlabel install rhel10/support-tools
    command: podman run --rm --privileged -v /:/host -e HOST=/host -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools registry.redhat.io/rhel10/support-tools:latest /bin/install.sh
    Creating directory at /host//etc/pki/support-tools
    Creating directory at /host//etc/support-tools.d
    Installing file at /host//etc/support-tools.conf
    Installing file at /host//etc/sysconfig/support-tools
    Installing file at /host//etc/logrotate.d/syslog
    Copy to Clipboard Toggle word wrap

    これにより、support-tools イメージが後で使用するファイルがホストシステム上に作成されます。

  4. support-toolsrun runlabel を表示します。

    # podman container runlabel run --display rhel10/support-tools
    command: podman run -d --privileged --name support-tools --net=host --pid=host -v /etc/pki/support-tools:/etc/pki/support-tools -v /etc/support-tools.conf:/etc/support-tools.conf -v /etc/sysconfig/support-tools:/etc/sysconfig/support-tools -v /etc/support-tools.d:/etc/support-tools.d -v /var/log:/var/log -v /var/lib/support-tools:/var/lib/support-tools -v /run:/run -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools --restart=always registry.redhat.io/rhel10/support-tools:latest /bin/support-tools.sh
    Copy to Clipboard Toggle word wrap

    これは、コマンドが support-tools コンテナーを起動して support-toolsd デーモンを実行するときに、ホストへの権限を開き、コンテナー内のホストから特定のファイルとディレクトリーをマウントすることを示しています。

  5. support-toolsrun runlabel を実行します。

    # podman container runlabel run rhel10/support-tools
    command: podman run -d --privileged --name support-tools --net=host --pid=host -v /etc/pki/support-tools:/etc/pki/support-tools -v /etc/support-tools.conf:/etc/support-tools.conf -v /etc/sysconfig/support-tools:/etc/sysconfig/support-tools -v /etc/support-tools.d:/etc/support-tools.d -v /var/log:/var/log -v /var/lib/support-tools:/var/lib/support-tools -v /run:/run -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools --restart=always registry.redhat.io/rhel10/support-tools:latest /bin/support-tools.sh
    28a0d719ff179adcea81eb63cc90fcd09f1755d5edb121399068a4ea59bd0f53
    Copy to Clipboard Toggle word wrap

    support-tools コンテナーは権限を開き、ホストから必要なものをマウントし、support-toolsd デーモンをバックグラウンドで実行します (-d)。support-toolsd デーモンはログメッセージの収集を開始し、メッセージを /var/log ディレクトリー内のファイルに送信します。

  6. support-toolsuninstall runlabel を表示します。

    # podman container runlabel uninstall --display rhel10/support-tools
    command: podman run --rm --privileged -v /:/host -e HOST=/host -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools registry.redhat.io/rhel10/support-tools:latest /bin/uninstall.sh
    Copy to Clipboard Toggle word wrap
  7. support-toolsuninstall runlabel を実行します。

    # podman container runlabel uninstall rhel10/support-tools
    command: podman run --rm --privileged -v /:/host -e HOST=/host -e IMAGE=registry.redhat.io/rhel10/support-tools:latest -e NAME=support-tools registry.redhat.io/rhel10/support-tools:latest /bin/uninstall.sh
    Copy to Clipboard Toggle word wrap
注記

この場合、uninstall.sh スクリプトは、/etc/logrotate.d/syslog ファイルを削除します。設定ファイルはクリーンアップされません。

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat