> For the complete documentation index, see [llms.txt](https://docs.plura.io/ko/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plura.io/ko/agents/edr/linux.md).

# 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/linux/install.sh | bash
```

**2. 라이선스 키 등록 및 실행**

* [x] 웹 UI의 "Install Agents"에서 라이선스 키를 확인한 후 입력합니다.
* [x] 라이선스 키 확인: PLURA 웹 로그인 후 상단 메뉴 > 관리 > 라이선스

```bash
plura register ****
```

* [x] 명령어에서 `****` 부분을 라이선스 키로 대체합니다.

**3. 설치 정보 확인**

```bash
plurad -version
```

> 예시 출력: `version: x.x.x`

**4. 설치 영상**

{% embed url="<https://www.youtube.com/embed/-7Khyjr73f0?si=4FyMmnNA3e4jmoHp>" %}

**5. 사용자 정의 설정**

* [x] 설정 파일을 수정합니다.
* [x] 일반적인 환경에서는 `plura.conf` 설정이 필요하지 않습니다.

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

```bash
1) 시스템 기동 시 에이전트 로그인 지연 설정
  # login_delay_sec = 0 
  # 단위(초)

2) AWS 환경에서 Auto Scaling을 사용할 경우 인스턴스 고유의 식별자 업로드
  # login_with_machine_id = 0
  # (값이 1일때 전송)

3) 다중 네트워크 인터페이스를 사용할 경우 PLURA에 표시되는 IP 주소 설정
  # interface = eth1
  # interface_mon = eth1 (리소스모니터링에서 네트워크 트래픽 수집 인터페이스 설정)

4) 시스템 기동 시 hostname 변경에 따른 로그인 지연 설정
  # login_hostname_check = 0 
  # (default = 0)
    0 > 지정된 지연시간까지 무조건 기다림
    1 > hostname 변경이 1회 감지되면 지연 중단
    2 > hostname 변경이 2회 감지되면 지연 중단
```

{% endtab %}

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

> Audit 활성화를 위한 선택 사항

**1. Audit 로그 패키지 개별 설치**

* CentOS, Red Hat, Amazon Linux

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

* Ubuntu

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

**2. Syslog + Audit 로그 패키지 통합 설치**

* 3번 패키지 설치 포함됨

```bash
plura install_syslog
```

**3. 시스템등록**

* CentOS, Red Hat, 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. 에이전트 설치 (root 권한 필요)**

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

**2. 라이선스 키 등록 및 실행**

```bash
plura register ***
```

**3. 웹 로그 모듈 설치**

```bash
plura install_weblog
```

**4. 에이전트 재실행**

```bash
plura stop
```

```bash
plura start
```

**5. 웹 로그 취합 설정**

<figure><img src="/files/fzbuzVF0vaSYLluK0grP" alt=""><figcaption></figcaption></figure>

**6. 에이전트 삭제**

```bash
plura uninstall
```

**7. 설치 영상**

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

{% tab title="Plurawebd" %}
**1. 에이전트 설치 (root 권한 필요)**

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

**2. 라이선스 키 등록 및 실행**

```sh
plura register ***
```

**3. 웹 로그 모듈 설치**

```sh
plura install_pluraweb
```

**4. 환경 설정**

```sh
vi /etc/pluraweb/conf/pluraweb.conf
```

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

```sh
pluraweb start
```

**5. 에이전트 재실행**

```bash
plura stop
```

```bash
plura start
```

**6. 에이전트 삭제**

```sh
plura uninstall
```

{% endtab %}

{% tab title="Command" %}
**1. 리눅스 명령어(command) 설치 (rsyslog 사용)**

* 사전 Syslog 설치 필요

```sh
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 %}

## 자동화 스크립트 <a href="#id-2" id="id-2"></a>

Linux 환경에서 PLURA-XDR Agent를 빠르게 설치할 수 있도록 자동화한 스크립트 모음입니다.

<https://github.com/QubitSecurity/EDR/tree/main/Linux/install>
