> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux/install-device-protection-for-linux.md).

# Linux 用 Device Protection をインストールする

Aikido ダッシュボードのコマンドを使って、エージェントを1台のマシン（自分のものでも、テスト対象のものでも可）にインストールします。複数台に展開するには、以下から方法を選んでください [Linux への展開](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux.md) の代わりに。

{% hint style="info" %}
Linux デバイスには systemd と root アクセスが必要です。 [対応エコシステム](/docs/docs-ja/aikido-device-protection/miscellaneous-aikido-endpoint/supported-ecosystems.md) で、Device Protection がサポートするディストリビューションとバージョンを確認してください。
{% endhint %}

## 1つのコマンドでインストール

{% stepper %}
{% step %}
**インストールコマンドを取得**

1. 次へ移動します： [Device Protection を開き、右上の Devices](https://app.aikido.dev/endpoint-protection/devices) タブを選択します。
2. クリックします **Connect Device** を開きます。
3. 選択 **手動インストール**.
4. Select the [ユーザーグループ](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/user-groups-for-aikido-endpoint.md) デバイスが参加すべきなので、次をコピーします **Linux のインストールコマンド**.
   {% endstep %}

{% step %}
**デバイス上で実行する**

このコマンドを root として実行します。ディストリビューションとアーキテクチャに合ったパッケージを選び、インストールし、コマンド内のトークンでデバイスを登録します。
{% endstep %}
{% endstepper %}

## インストール方式を選択

ダッシュボードのコマンドはデスクトップ版をインストールします。デスクトップセッションのないマシンでは追加のフラグが1つ必要で、コマンドの残りは同じです:

| マシン                                                                 | フラグ           |
| ------------------------------------------------------------------- | ------------- |
| 誰かが作業するラップトップまたはワークステーション                                           | なし            |
| 保持しているサーバーまたは VM: ビルドサーバー、CI ランナー、Docker または Kubernetes ホスト、クラウド VM | `--headless`  |
| コンテナイメージ内、またはジョブ後に破棄されるホスト型 CI ランナー                                 | `--container` |

{% code overflow="wrap" %}

```bash
curl -fsSL https://github.com/AikidoSec/safe-chain/raw/refs/heads/main/install-scripts/install-endpoint-linux.sh | sudo sh -s -- --token "$AIKIDO_TOKEN" --headless
```

{% endcode %}

`--headless` トレイアイコンとデスクトップパッケージを省き、保護機能は同じです。 `--container` これも同様に行い、透過的なデータパスではなくローカルプロキシへエージェントを切り替えます。そのため再起動も不要です。コンテナイメージには、エージェントを起動するエントリーポイントなど、さらにいくつか必要なものがあるので、 [コンテナ内の Device Protection](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux/device-protection-in-containers.md)を参照してください。ホスト型 CI ランナーは VM ですが、ジョブから再起動することはできないため、 `--container` も指定し、エージェントを明示的に起動します。 [Linux への展開](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux.md) 配下の CI ガイドにその例があります。コンテナをビルドして実行する Docker、Kubernetes、Jenkins のホストはサーバーなので、そこで `--headless` を使ってください。

## 手動インストール

ファイル自体が必要な場合、社内ミラーに配置する場合、またはダウンロード URL に到達できないホストにインストールする場合は、パッケージを直接使用してください。まず `uname -m` を実行します: `x86_64` は amd64 を意味し、 `aarch64` は arm64 を意味します。

{% tabs %}
{% tab title="Ubuntu / Debian" %}

| アーキテクチャ           | パッケージ                                                                                                                                  |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| amd64 (`x86_64`)  | [EndpointProtection-amd64.deb](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-amd64.deb) |
| arm64 (`aarch64`) | [EndpointProtection-arm64.deb](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-arm64.deb) |

{% code overflow="wrap" %}

```bash
curl -fLO https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-amd64.deb
sudo AIKIDO_TOKEN=<your-token> apt install ./EndpointProtection-amd64.deb
```

{% endcode %}
{% endtab %}

{% tab title="RHEL / Rocky Linux / CentOS" %}
次を使用してください: `el9` はバージョン 9 でビルドされ、 `el10` はバージョン 10 でビルドされます。Amazon Linux 2023 でも `el9` ビルドを使います。

| バージョン | アーキテクチャ           | パッケージ                                                                                                                                            |
| ----- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 9     | amd64 (`x86_64`)  | [EndpointProtection-amd64.el9.rpm](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-amd64.el9.rpm)   |
| 9     | arm64 (`aarch64`) | [EndpointProtection-arm64.el9.rpm](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-arm64.el9.rpm)   |
| 10    | amd64 (`x86_64`)  | [EndpointProtection-amd64.el10.rpm](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-amd64.el10.rpm) |
| 10    | arm64 (`aarch64`) | [EndpointProtection-arm64.el10.rpm](https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-arm64.el10.rpm) |

{% code overflow="wrap" %}

```bash
curl -fLO https://github.com/AikidoSec/safechain-internals/releases/latest/download/EndpointProtection-amd64.el9.rpm
sudo AIKIDO_TOKEN=<your-token> dnf install ./EndpointProtection-amd64.el9.rpm
```

{% endcode %}
{% endtab %}
{% endtabs %}

パッケージは `AIKIDO_TOKEN` インストール中に読み込み、その後サービス自体を有効化して起動するので、他に実行することはありません。

ここにはフラグがないため、デスクトップのないマシンでは、トークンの横に設定した環境変数からその種類を判断します: `AIKIDO_HEADLESS=1` サーバーまたは VM 用、または `AIKIDO_CONTAINER=1` と `AIKIDO_CI_CD=1` を `--no-install-recommends` を Debian 系で、または `--setopt=install_weak_deps=False` を Red Hat 系で追加すると、デスクトップパッケージを除外できます。

{% content-ref url="/pages/ac3d4132a27cfcc92a6258261e894f8c2049a26a" %}
[Linux でのトレイアイコン対応](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux/install-device-protection-for-linux/tray-icon-support-on-linux.md)
{% endcontent-ref %}

## インストールを確認

{% code overflow="wrap" %}

```bash
systemctl status aikido-endpoint-protection
aikidoctl バージョン
```

{% endcode %}

その後、デバイスはあなたの [デバイス一覧](https://app.aikido.dev/endpoint-protection/devices) に、 **Active** のステータス。ブロックが実際に機能することを確認するには、 [Device Protection が機能しているか確認する方法](/docs/docs-ja/aikido-device-protection/miscellaneous-aikido-endpoint/how-to-test-device-protection.md).

{% hint style="info" %}
インストールすると、Node.js と uv がシステム全体の環境変数を通じて Aikido CA を参照するようになります。すでに起動しているシェルには反映されないので、パッケージのインストールをテストする前に新しいログインシェルを開くか、再起動してください。

`aikidoctl` macOS や Windows と同じ inspect、pause、diagnostics コマンドを利用できます。 [aikidoctl CLI](/docs/docs-ja/aikido-device-protection/miscellaneous-aikido-endpoint/aikidoctl-cli.md).

ある `--headless` または `--container` install にはありません **アクセスをリクエスト** ボタン。パッケージに管理者の承認が必要な場合は、次を実行します `aikidoctl request` 代わりに。参照 [コマンドラインからブロックされたインストールをリクエストする](/docs/docs-ja/aikido-device-protection/miscellaneous-aikido-endpoint/aikidoctl-cli/request-a-blocked-install.md).
{% endhint %}

## アップグレード

同じコマンドで、新しいパッケージを既存のものの上からインストールします。デバイスの登録情報と設定は保持されるため、トークンを再度入力する必要はありません。

## トラブルシューティング

| 問題                                                   | 修正                                                                                                                                                                                                                                |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| パッケージはインストールされますが、デバイスがダッシュボードに表示されません               | `AIKIDO_TOKEN` はインストールコマンドに対して設定されていませんでした。構成管理ツールはローカル環境をホストへ引き継がないため、タスク自体で変数を設定してから、パッケージを再度インストールしてください                                                                                                                       |
| `apt` または `dnf` ファイルをインストールするのではなく、リポジトリ内のパッケージを探します | 名前ではなくパスを指定してください: `apt install ./EndpointProtection-amd64.deb`。先頭の `./` が、パッケージマネージャーにそれをローカルファイルとして扱わせます                                                                                                                        |
| Red Hat系ホストではインストールが失敗します                            | ビルドをメジャーバージョンに合わせてください:  `el9` バージョン9ではこのパッケージを、そして `el10` バージョン10ではこのパッケージを                                                                                                                                                      |
| サービスが実行されていません                                       | 実行します `systemctl status aikido-endpoint-protection`、その後 `sudo aikidoctl diagnostics` 詳細を送信してください                                                                                                                                  |
| Node.js または uv が、まだ Aikido の証明書を拒否します                | インストールすると設定されます `NODE_EXTRA_CA_CERTS` と `UV_SYSTEM_CERTS` システム全体に設定され、実行中のシェルには反映されません。新しいログインシェルを開くか、デバイスを再起動してください                                                                                                              |
| トークンが実行出力やログに表示されます                                  | ツールのマスキング機能を使用してください: `no_log` Ansibleでは、 `sensitive true` Chefでは、 `Sensitive()` Puppetでは                                                                                                                                         |
| 複数のマシンがデバイス一覧の1つのエントリを共有しています                        | 同じものを使って起動しました `/etc/machine-id`。Linux でのデバイス識別はそのファイルに従うため、クローン元のイメージでそれを消去し、初回起動時に systemd に新しいものを書き込ませてください                                                                                                                    |
| トレイアイコンが表示されません                                      | Ubuntu 以外の GNOME では想定どおりで、見た目の問題です。参照: [Linux でのトレイアイコン対応](/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux/install-device-protection-for-linux/tray-icon-support-on-linux.md) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.aikido.dev/docs/docs-ja/aikido-device-protection/deploying-aikido-endpoint/device-protection-mdm-guides/linux/install-device-protection-for-linux.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
