> 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/mashinsukyan/local-vm-scanning/setting-up-the-local-vm-scanner-linux.md).

# LinuxでローカルVMスキャナーを設定する

Aikido VM Scannerは、システムにインストールされる単一パッケージで、依存関係を自動的にスキャンして識別し、環境の詳細なビューを提供します。

### 前提条件

* 最小システム要件: RAM は少なくとも 1GB。
* 推奨システム要件: RAM は少なくとも 2GB、CPU は 4 個。
* システムで sudo / 管理者権限があることを確認してください
* ご利用のシステムまたはクラウドプロバイダーに適したコマンドを使用してください
* root で実行する必要がある場合は、AIKIDO\_TOKEN 環境変数を sudo の後に置きます。例:\
  `sudo AIKIDO_TOKEN=REPLACE_ME <install_command>`

### インストールとアップグレード

sudo で実行し、置き換えてください `AIKIDO_TOKEN` で [Aikido のローカル VM スキャンページの有効なトークン](https://app.aikido.dev/settings/integrations/vm-scan-agent). VM 環境（後で Aikido で表示されます）を指定するには、 `VM_TYPE` 変数を次のいずれかとして設定できます: `本番環境`, `staging` または `開発`.

VM Scanner エージェントは 1 日 1 回、午前 4:00 〜 午前 8:00 の間のランダムな時刻（マシン時間）に実行されます。

インストール後、 **最初のスキャンが自動的に開始されます**. 必要なときに実行したい場合は、手動で次を実行できます:

```bash
/opt/aikido-vm-scanner-1.4.8/aikido-vm-scanner
```

#### **Red Hat ベースのシステム（RHEL、CentOS、Fedora）向け**

**x86\_64**

```
AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production dnf install -y https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.x86_64.rpm
```

<table><thead><tr><th width="100.1015625">ハッシュ</th><th>aikido-vm-scanner.x86_64.rpm</th></tr></thead><tbody><tr><td>MD5</td><td>0cba911e55b41766952d9d5390bb5cf9</td></tr><tr><td>SHA256</td><td>ed47754b8b0897ac49425e231ec91592dbc91e1aab1d98cf3cbbbb73a9d6ab1d</td></tr></tbody></table>

**aarch64**

```
AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production dnf install -y https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.aarch64.rpm
```

<table><thead><tr><th width="99.953125">ハッシュ</th><th>aikido-vm-scanner.aarch64.rpm</th></tr></thead><tbody><tr><td>MD5</td><td>6cecc3da8dd6072402585f631855baa0</td></tr><tr><td>SHA256</td><td>13ba77be9e682fca3be8e6879e4c0165d6474651110692ae9dc85361a71ae5d6</td></tr></tbody></table>

#### **Debian ベースのシステム（Debian、Ubuntu）向け**

{% hint style="warning" %}
Debian >= 10 および Ubuntu >= 20.04 をサポートしています。
{% endhint %}

**x86\_64**

```
curl -L -O https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.amd64.deb
AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production apt-get install -y ./aikido-vm-scanner.amd64.deb
```

<table><thead><tr><th width="100.36328125">ハッシュ</th><th>aikido-vm-scanner.amd64.deb</th></tr></thead><tbody><tr><td>MD5</td><td>e2ee97a353152f5818c095f862962ed2</td></tr><tr><td>SHA256</td><td>d0337239b3b0de4276b8bbaab3066c935eff39b9666ea40ad062972631777831</td></tr></tbody></table>

**aarch64**

```
curl -L -O https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.arm64.deb
AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production apt-get install -y ./aikido-vm-scanner.arm64.deb
```

<table><thead><tr><th width="100.19921875">ハッシュ</th><th>aikido-vm-scanner.arm64.deb</th></tr></thead><tbody><tr><td>MD5</td><td>188ab30e97d5a099af384e10b6ce7f15</td></tr><tr><td>SHA256</td><td>078e0af8c93adcf59e967debadbef05c5e3547618d57fa8b3236b8932a553f5d</td></tr></tbody></table>

### 最新バージョン

自動インストールプロセスがあり、リリースされ次第常に最新バージョンを使いたい場合は、インストールリンク内のバージョンを `最新`:

* <https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/latest/aikido-vm-scanner.x86\\_64.rpm>
* <https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/latest/aikido-vm-scanner.aarch64.rpm>
* <https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/latest/aikido-vm-scanner.amd64.deb>
* <https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/latest/aikido-vm-scanner.arm64.deb>

### 追加設定

#### トークン設定

何らかの理由でインストール時に AIKIDO\_TOKEN を設定できない場合は、インストール後にトークンを次の 2 つの方法のいずれかで設定できます:

* トークンを次に貼り付けます `/opt/aikido-vm-scanner-1.4.8/.token`
* 次の内容を変更します `/opt/aikido-vm-scanner-1.4.8/config.json` :

```
{
    "api_key": "AIKIDO_TOKEN_HERE",
    "exclude": []
}
```

#### ホスト名の変更

デフォルトでは、スキャン対象マシンのホスト名を自動取得して Aikido に送信し、Virtual Machines タブに表示します。

報告されるホスト名を変更したい場合は、設定ファイルで変更できます:

```
{
    "hostname": "YOUR_HOSTNAME_HERE",
    "exclude": []
}
```

#### ファイルまたはパスを除外

config.json では、exclude リストに項目を追加することでファイルやパスを除外できます。以下に例を示します。

* ディレクトリ内の単一ファイルを除外:

```
{
    "exclude": [
        ...
        "./home/testing/app/package.json",
    ]
}
```

* すべての releases サブディレクトリを除外:

```
{
    "exclude": [
            ...
            "./home/testing/*/releases",
    ]
}
```

* out フォルダ内およびすべてのサブディレクトリにある .json ファイルをすべて除外:

```
{
    "exclude": [
        ...
        "./out/**/*.json",
    ]
}
```

* スキャンから cataloger を除外する（例: Golang cataloger を除外）:

```
{
    "exclude": [
    ],
    "select_catalogers": "-go"
}
```

#### 出力チャネル

VM scanner の出力チャネルを制御したい場合は、インストール時に OUTPUT 変数を次のように指定できます `標準出力`, `標準エラー出力` または `なし`.

rpm x86\_64 の例:

```
AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production OUTPUT=stderr dnf install -y https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.x86_64.rpm
```

{% hint style="info" %}
このオプションはディスクログには影響しません。ディスクログは、この設定に関係なく作成されます。
{% endhint %}

#### 初回スキャンを無効化

rpm/deb パッケージがインストールされると、自動的に初回スキャンが開始されます。\
この機能を無効にしたい場合は、次の `初回スキャン` パラメータをインストール時に 0 に設定できます。例:

```
AIKIDO_TOKEN=REPLACE_ME INITIAL_SCAN=0 dnf install -y https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.4.8/aikido-vm-scanner.x86_64.rpm
```

#### CLI パラメータ

何らかの理由でコマンドラインから必要なときにスキャンを開始する必要がある場合は、そのスキャンで使用する次の CLI パラメータを指定できます:

```
  --api-key string
        認証用 API キー
  --hostname string
        マシンのホスト名
  --select-catalogers string
        使用または削除する cataloger のカンマ区切りリスト
  --vm-type string
        仮想マシンの種類
```

これらの CLI パラメータは config.json で指定されたものより優先されます。

{% hint style="warning" %}
自動スキャンは 1 日 1 回実行され、そのスキャンでは CLI パラメータではなく設定ファイルが引き続き使用されるため、これらは常に config.json に記載することを推奨します。
{% endhint %}

* CLI でカスタムホスト名を設定する例:

```
/opt/aikido-vm-scanner-1.4.8/aikido-vm-scanner --hostname "My Custom VM"
```

* CLI で Golang cataloger を除外する例:

```
/opt/aikido-vm-scanner-1.4.8/aikido-vm-scanner --select-catalogers "-go"
```

### アンインストール

#### 手動アンインストール

**Red Hat ベースのシステム（RHEL、CentOS、Fedora）向け**

```
dnf remove -y aikido-vm-scanner
```

**Debian ベースのシステム（Debian、Ubuntu）向け**

```
apt-get remove -y aikido-vm-scanner
```

### ログ

ログはここで、最後に生成された SBOM とともに確認できます: `/var/log/aikido-vm-scanner-1.4.8`


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/mashinsukyan/local-vm-scanning/setting-up-the-local-vm-scanner-linux.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
