WSL Elasticsearch 설치하기

Hanna·2022년 2월 21일
0

elasticsearch

목록 보기
1/1

설치 순서(elastic 8.0)

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.0.0-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-8.0.0-linux-x86_64.tar.gz
cd elasticsearch-8.0.0/

실행

./bin/elasticsearch

✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

ℹ️  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):

ℹ️  HTTP CA certificate SHA-256 fingerprint:

ℹ️  Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):

ℹ️  Configure other nodes to join this cluster:
• On this node:
  ⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  ⁃ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  ⁃ Restart Elasticsearch.
• On other nodes:
  ⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.

만약 아래와 같은 에러가 발생할 때

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

=> PID1 오류해결방법

elasticsearch 실행

sudo service elasticsearch start

작동이 잘 되는지 확인해볼 때

curl --cacert ./config/certs/http_ca.crt -u elastic https://localhost:9200

elasticsearch 비밀번호 바꿀 때

sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic

이런 식으로 비밀번호가 뜸

curl: (77) error setting certificate verify locations: CAfile: /etc/elasticsearch/config/certs/http_ca.crt CApath: none

profile
매일 성장하고 있습니다

0개의 댓글