midnightly
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (1) - Elasticsearch ์ค์น ๋ณธ๋ฌธ
๐ ํ๊ฒฝ ๊ตฌ์ฑ
๊ตฌ๋ถ | ์ฌ์ |
OS | Cent OS 8 |
CPU | 2 Core |
RAM | 4 GB |
DISK | 20 GB |
1. ์ ์กฐ๊ฑด์ผ๋ก ๊ตฌ์ฑ๋ VM 3๊ฐ๋ฅผ ์ค๋นํ๋ค.
- 1๋ฒ VM์ ElasticSearch, Kibana, LogStash, Beats๋ฅผ ์ค์น
- 2, 3๋ฒ VM์๋ ElasticSearch๋ง ์ค์น
2. ๋ฐฉํ๋ฒฝ ์ค์ง
systemctl stop firewalld
๐ ์ค์น
1. ElasticSearch (๐ข ๋ชจ๋ VM์ ๋์ผํ ์์ ์ํ)
(1) ์ฌ์ฉ์ ์ถ๊ฐ
- ES๋ root ๊ณ์ ์ผ๋ก ์คํ์ด ์๋๊ธฐ ๋๋ฌธ์ ์ฌ์ฉ์ ๊ณ์ ์ ์ถ๊ฐํ๋ค.
useradd elastic
- ์์ฑํ ๊ณ์ ์ผ๋ก ์ ํํ๋ค.
su - elastic
(2) ElasticSearch ๋ค์ด & ์์ถ ํ๊ธฐ
- https://www.elastic.co/kr/downloads/elasticsearch ์ ์ํด์ LINUX X86_64 ๋งํฌ ์ฃผ์ ๋ณต์ฌ ํด๋ฆญ
- wget์ผ๋ก ํ์ผ ๋ค์ด
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.0-linux-x86_64.tar.gz
- ์์ถ ํด์
tar -xvzf elasticsearch-7.15.0-linux-x86_64.tar.gz
(3) elasticsearch.yml ์์
- config/elasticsearch.yml ํ์ผ์ ์์ ํ๋ค.
cluster.name: es-cluster # ํด๋ฌ์คํฐ ์ด๋ฆ์ ๋์ผํด์ผ ํจ
node.name: node01
network.host: 192.168.137.101
http.port: 9200
discovery.seed_hosts: ["192.168.137.101", "192.168.137.102", "192.168.137.103"]
cluster.initial_master_nodes: ["node01", "node02", "node03"]
node.master: true
node.data: true
node.ingest: true
gateway.recover_after_nodes: 3
(4) ์คํ
- ES๋ฅผ ์คํํ๋ค.
bin/elasticsearch
- ์ฃผ์๋ก ์ ์ํด์ ES๊ฐ ์ ์์ ์ผ๋ก ์คํ์ด ๋๋์ง ํ์ธ
curl http://192.168.137.101:9200
'ELK' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (4) - Filebeat ์ค์น (0) | 2021.10.15 |
---|---|
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (3) - LogStash ์ค์น (0) | 2021.10.15 |
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (2) - Kibana ์ค์น (0) | 2021.10.15 |