{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"RhelおよびCentosへのTD Agentのインストール","description":"RHELおよびCentOSでTd-agentをインストールする手順と、異なるバージョンのインストール方法を詳しく解説するドキュメントページです。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rhelおよびcentosへのtd-agentのインストール","__idx":0},"children":["RhelおよびCentosへのTD Agentのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agentは、Treasure Dataによって保守されているFluentdの安定版ディストリビューションパッケージです。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ruby gemからのインストールはほとんどのユーザーにとって困難であるため、より簡単にインストールして使用できるパッケージを作成しました。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.fluentd.org/faqs"},"children":["FluentdとTd-agentの違い"]},"について学んでください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ノード上でntpdを設定して時計を同期することを強くお勧めします。そうしないと、ログに無効なタイムスタンプが含まれる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"インストールまたはアップグレード","__idx":2},"children":["インストールまたはアップグレード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の方法を使用して、新規インストールまたは以前のバージョンからアップグレードできます。現在保守されているバージョンであるため、td-agent4の使用をお勧めします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-agent4の場合","__idx":3},"children":["td-agent4の場合"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"redhat--centos","__idx":4},"children":["Redhat / CentOS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["現在、CentOSとRHEL 7、8 64ビットがサポートされています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh"},"children":["install-redhat-td-agent4.sh"]},"を実行すると、マシン上にtd-agentが自動的にインストールされます。シェルスクリプトは_/etc/yum.repos.d/td.repo_に新しいrpmリポジトリを登録し、td-agent rpmパッケージをインストールします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-agent3の場合","__idx":5},"children":["td-agent3の場合"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"redhat--centos-1","__idx":6},"children":["Redhat / CentOS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["現在、CentOSとRHEL 6、7、8 64ビットがサポートされています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh"},"children":["install-redhat-td-agent3.sh"]},"を実行すると、マシン上にtd-agentが自動的にインストールされます。シェルスクリプトは_/etc/yum.repos.d/td.repo_に新しいrpmリポジトリを登録し、td-agent rpmパッケージをインストールします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スクリプトでは、リポジトリパスとして$releaseverを使用しています。RHELまたはCentOSのメジャーバージョン(ver. 7など)のみを$releaseverの実行環境として使用してください。環境が「7.2」などのバージョンレベルを使用している場合は、メジャーバージョンに変更するか、TDリポジトリを手動で設定してください。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-setting_repository_options"},"children":["https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-setting_repository_options"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"デーモンの起動","__idx":7},"children":["デーモンの起動"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agentは2つのスクリプトを提供します:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"systemdtd-agent4--td-agent3","__idx":8},"children":["systemd(td-agent4 / td-agent3)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["_/usr/lib/systemd/system/td-agent_スクリプトは、エージェントの起動、停止、または再起動を行うために提供されています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo systemctl start td-agent.service\nsudo systemctl status td-agent.service\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"● td-agent.service - td-agent: Fluentd based data collector for Treasure Data\n   Loaded: loaded (/lib/systemd/system/td-agent.service; disabled; vendor preset: enabled)\n   Active: active (running) since Thu 2017-12-07 15:12:27 PST; 6min ago\n     Docs: /products/customer-data-platform/integration-hub/streaming/td-agent\n  Process: 53192 ExecStart = /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid (code = exited, statu\n Main PID: 53198 (fluentd)\n   CGroup: /system.slice/td-agent.service\n           ├─53198 /opt/td-agent/embedded/bin/ruby /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent\n           └─53203 /opt/td-agent/embedded/bin/ruby -Eascii-8bit:ascii-8bit /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /v\n\nDec 07 15:12:27 ubuntu systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data...\nDec 07 15:12:27 ubuntu systemd[1]: Started td-agent: Fluentd based data collector for Treasure Data.\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["systemdの動作をカスタマイズしたい場合は、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td-agent.service"]},"を",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/systemd/system"]},"に配置してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initdtd-agent2--td-agent3","__idx":9},"children":["init.d(td-agent2 / td-agent3)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/init.d/td-agent"]},"スクリプトは、エージェントの起動、停止、または再起動を行うために提供されています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo /etc/init.d/td-agent start\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Starting td-agent: [  OK  ]\n"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo /etc/init.d/td-agent status\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"td-agent (pid  21678) is running...\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のコマンドがサポートされています:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo /etc/init.d/td-agent start\nsudo /etc/init.d/td-agent stop\nsudo /etc/init.d/td-agent restart\nsudo /etc/init.d/td-agent status\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定ファイルが",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/td-agent/td-agent.conf"]},"にあることを確認してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cookbook","__idx":10},"children":["Cookbook"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agentをインストールする多数のマシンがある場合は、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://www.opscode.com/chef/"},"children":["OpsCode chef cookbook"]},"を使用して、このtd-agentプロセスを自動化することを検討してください。td-agent cookbookについては、https://github.com/treasure-data/chef-td-agent を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"その他のリソース","__idx":11},"children":["その他のリソース"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agentのChangeLogはこちらで入手できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/integration-hub/streaming/td-agent/td-agent-logs-sent-to-treasure-data"},"children":["変更ログ"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataを使用している方は、以下のドキュメントも参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-integrations/fluentd-continuous-data-import-integration"},"children":["td-agentを使用した継続的データインポート"]}]}]},"headings":[{"value":"RhelおよびCentosへのTD Agentのインストール","id":"rhelおよびcentosへのtd-agentのインストール","depth":1},{"value":"前提条件","id":"前提条件","depth":1},{"value":"インストールまたはアップグレード","id":"インストールまたはアップグレード","depth":1},{"value":"td-agent4の場合","id":"td-agent4の場合","depth":2},{"value":"Redhat / CentOS","id":"redhat--centos","depth":3},{"value":"td-agent3の場合","id":"td-agent3の場合","depth":2},{"value":"Redhat / CentOS","id":"redhat--centos-1","depth":3},{"value":"デーモンの起動","id":"デーモンの起動","depth":1},{"value":"systemd(td-agent4 / td-agent3)","id":"systemdtd-agent4--td-agent3","depth":2},{"value":"init.d(td-agent2 / td-agent3)","id":"initdtd-agent2--td-agent3","depth":2},{"value":"Cookbook","id":"cookbook","depth":1},{"value":"その他のリソース","id":"その他のリソース","depth":1}],"frontmatter":{"seo":{"title":"RhelおよびCentosへのTD Agentのインストール","description":"RHELおよびCentOSでTd-agentをインストールする手順と、異なるバージョンのインストール方法を詳しく解説するドキュメントページです。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/integration-hub/streaming/td-agent/installing-td-agent-on-rhel-and-centos","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}