# Linux

{% hint style="info" %}
エージェントのインストール時にrootアカウントが必要
{% endhint %}

## 設置案内 <a href="#id-1" id="id-1"></a>

{% tabs %}
{% tab title="Syslog" %}
**1. EDRエージェントのインストール**

```bash
sudo -s
```

```bash
curl https://repo.plura.io/v5/agent/install.sh | bash
```

**2. ライセンスキーの登録と実行**

* [x] WebUIの「Install Agents」でライセンスキーを確認してから入力してください。
* [x] ライセンスキーの確認: PLURAウェブログイン後、上部メニューの「管理」>「ライセンス」。

```bash
/etc/plura/plura.sh register ****
```

* [x] コマンド内の\*\*\*\*部分をライセンスキーに置き換えて実行してください。

**3. インストール情報確認**

```bash
/etc/plura/plurad -version
```

> version: x.x.x

**4. ユーザー定義設定**

* [x] 設定ファイルの修正

```bash
vi /etc/plura/conf/plura.conf
```

```bash
1) システム起動時のエージェントログイン遅延の設定
# login_delay_sec = 0
（秒単位）

2) AWS環境でAuto Scalingを使用する際のインスタンス固有識別子をPLURA V5システムに転送する設定
# login_with_machine_id = 0
（値が1の場合に転送）

3) 複数のネットワークインターフェイスを使用する際にPLURA V5ウェブに表示されるIPアドレスの設定
# interface = eth1
# interface_mon = eth1 （システム > リソース監視 > ネットワークトラフィックを収集するインターフェイスの設定）

4) システム起動時のhostname変更によるログイン遅延の設定
# login_hostname_check = 0
（default = 0）

0：設定された遅延時間まで無期限に待機
1：hostname変更が1回検出されたら遅延中断
2：hostname変更が2回検出されたら遅延中断
```

**5. 設置映像**

{% embed url="<https://www.youtube.com/embed/XcVecpRX_w4?si=DyPgHRuljVQDKfcg>" %}

{% endtab %}

{% tab title="Syslog-Audit" %}

> Audit活性化のために下記の1、2番の中から選択使用

**1. Auditログパッケージ個別インストール**

* CentOS、Red Hat、Rocky Linux、Amazon Linux

```bash
dnf -y install audit audisp-plugins
```

* Ubuntu

```bash
apt -y update
apt -y install auditd audispd-plugins
```

**2. Syslog + Auditログパッケージ統合インストール**

* 3番パッケージの設置が含まれる

```bash
/etc/plura/plura.sh install_syslog
```

**3. システム登録**

* CentOS、Red Hat、Rocky Linux、Amazon Linux

```bash
/sbin/init.d/syslogd start
```

* Ubuntu

```bash
apt -y update
apt -y install cron logrotate rsyslog
```

{% endtab %}

{% tab title="Apache | Nginx" %}
**1. エージェントのインストール (by root)**

```bash
sudo -s
curl https://repo.plura.io/v5/agent/linux/install.sh | bash
```

**2. ライセンスキーの登録と実行**

```bash
/etc/plura/plura.sh register ***
```

**3. ウェブログモジュールのインストール**

```bash
/etc/plura/plura.sh install_web
```

**4. エージェントの再実行**

```bash
/etc/plura/plura.sh stop
```

```bash
/etc/plura/plura.sh start
```

**5. ウェブログ集約設定**

&#x20;![](/files/axZhSZVRjNMMu4TUsPEd)

**6. エージェント削除**

```bash
/etc/plura/plura.sh uninstall
```

**7. 設置映像**

{% embed url="<https://www.youtube.com/embed/Jbw6oObfvxo?si=a7XkjD0xl4Z6i0KX>" %}
{% endtab %}

{% tab title="plurawebd" %}
**1. エージェントのインストール (by root)**

```bash
sudo -s
curl https://repo.plura.io/v5/agent/linux/install.sh | bash
```

**2. ライセンスキーの登録と実行**

```bash
/etc/plura/plura.sh register ***
```

**3. ウェブログモジュールのインストール**

```bash
/etc/plura/plura.sh install_pluraweb
```

**4. 環境設定**

```bash
vi /etc/pluraweb/conf/pluraweb.conf
```

```bash
<例示>
interface = eth0
logfile = /var/log/plura/weblog.log
host = 10.100.10.10
port = 80
```

```bash
service plurawebd start
```

**5. エージェントの再実行**

```bash
/etc/plura/plura.sh stop
```

```bash
/etc/plura/plura.sh start
```

**6. エージェント削除**

```bash
/etc/plura/plura.sh uninstall
```

{% endtab %}

{% tab title="Command" %}
**1. Linuxコマンド(command)のインストール**

* 辞書Syslogのインストールが必要

```bash
curl https://repo.plura.io/v5/module/rsyslog/pcmd.sh -o /etc/profile.d/pcmd.sh
source /etc/profile
```

**2. Command 対数収集中止**

```bash
trap - DEBUG
rm /etc/profile.d/pcmd.sh
source /etc/profile
```

{% endtab %}

{% tab title="Specialized" %}
**1. PLC**

```bash
sudo -s
```

```bash
curl -s https://repo.plura.io/v5/agent/linux/install | bash -s PLC
```

**2. Squid**

```bash
curl -s https://repo.plura.io/v5/agent/linux/install | bash -s squid
```

**3. Haproxy**

```bash
curl -s https://repo.plura.io/v5/agent/linux/install | bash -s haproxy
```

**4. Embedded Linux for Commax**

4.1. 32 bit

```bash
curl -s https://repo.plura.io/v5/agent/linux/install | bash -s commanx32
```

4.2. 64 bit

```bash
curl -s https://repo.plura.io/v5/agent/linux/install | bash -s commanx64
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.plura.io/ja/agents/edr/linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
