설치할 elasticsearch 방식 선택

해당 매뉴얼은 centos에서 설치하여 yum을 선택하였습니다.

https://www.elastic.co/kr/downloads/elasticsearch

 

yum을 이용할 repository 추가

X
user@localhost:~

[root@localhost]# echo '[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md' > /etc/yum.repos.d/elasticsearch.repo

 

현재 기준으로 표준 설치는 elasticsearch 8.6.2 이지만, elastalert의 plugin 버전을 맞춘겁니다.

설치 시 꼭 하단 링크의 elastalert의 버전과 호환되는 버전으로 설치하세요

elastalert-plugin: https://github.com/karql/elastalert-kibana-plugin/releases

 

yum을 이용한 elasticsearch 설치

X
user@localhost:~

[root@tmplogsvr ~]# yum install --enablerepo=elasticsearch elasticsearch
Elasticsearch repository for 8.x packages                                                                                                                             19 MB/s |  24 MB     00:01
마지막 메타자료 만료확인 0:00:04 이전인: 2023년 03월 15일 (수) 오후 05시 45분 17초.
종속성이 해결되었습니다.
======================================================================================================================================
 꾸러미                         구조                    버전                     레포지터리                      크기
======================================================================================================================================
설치 중:
 elasticsearch                  x86_64                  8.6.2-1                  elasticsearch                  555 M
연결 요약
======================================================================================================================================
설치  1 꾸러미
 
총계 내려받기 크기: 555 M
설치된 크기 : 1.1 G
진행 할 까요? [y/N]: y
꾸러미 내려받기 중:
elasticsearch-8.6.2-x86_64.rpm                                                                         34MB/s | 555 MB     00:16
--------------------------------------------------------------------------------------------------------------------------------------
합계                                                                                                   34 MB/s | 555 MB     00:16
Elasticsearch repository for 8.x packages                                                              91 kB/s | 1.7 kB     00:00
GPG키 0xD88E42B4 가져오는 중:
사용자 ID : "Elasticsearch (Elasticsearch Signing Key) <dev_ops@elasticsearch.org>"
지문: 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
출처 : https://artifacts.elastic.co/GPG-KEY-elasticsearch
진행 할 까요? [y/N]: y
키 가져오기에 성공했습니다
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
  준비 중           :                                                                                                          1/1  
스크립트릿 실행 중: elasticsearch-8.6.2-1.x86_64                                                                               1/1
Creating elasticsearch group... OK
Creating elasticsearch user... OK
 
  설치 중           : elasticsearch-8.6.2-1.x86_64                                                                             1/1
  스크립트릿 실행 중: elasticsearch-8.6.2-1.x86_64                                                                             1/1
--------------------------- Security autoconfiguration information ------------------------------
 
Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.
 
The generated password for the elastic built-in superuser is : =pabVnRNFDFfWzuZKdW=
 
If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.
 
You can complete the following actions at any time:
 
Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
 
Generate an enrollment token for Kibana instances with
 '/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
 
Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.
 
-------------------------------------------------------------------------------------------------
'###NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
'### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
 
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.
 
  확인 중           : elasticsearch-8.6.2-1.x86_64                                                                            1/1
 
설치되었습니다:
  elasticsearch-8.6.2-1.x86_64
완료되었습니다!
[root@tmplogsvr ~]#

elasticsearch 시스템 등록

X
user@localhost:~

/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service

elasticsearch 시스템 시작 / 중지

X
user@localhost:~

/bin/systemctl start elasticsearch.service
/bin/systemctl stop elasticsearch.service

'기술 노트 > elasticsearch' 카테고리의 다른 글

elasticsearch shards 늘려주는 명령어  (0) 2023.06.15
elasticsearch 설정  (0) 2023.02.16

+ Recent posts