Elasticsearch

Elastic search 설치(Mac, Docker)

ri5 2023. 7. 15. 17:17

Elastic search Download(Mac)

아래에서 링크를 통해 다운로드하고자 하는 엘라스틱서치 버전을 선택하여 다운로드 합니다. 

https://www.elastic.co/kr/downloads/past-releases#elasticsearch

 

Past Releases of Elastic Stack Software

Looking for a past release of Elasticsearch, Logstash, Kibana, es-hadoop, Shield, Marvel, or our language clients? You're in the right place.

www.elastic.co

다운로드 받은 파일을 압축해제합니다.

터미널을 실행시키고 설치된 엘라스틱서치 디렉토리로 이동후  ./bin/elasticsearch 명령어를 입력하여 실행시킵니다.

웹브라우저에 localhost:9200을 입력한 후 엔터를 누르면 정상적으로 켜진것을 확인할 수 있습니다.

Elastic search Download(Docker)

도커 명령어를 통해 원하는 elasticsearch의 버전을 다운로드 받습니다.

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.1

선택사항: 다운로드 받는 도커이미지가 유효한지 확인합니다.

wget https://artifacts.elastic.co/cosign.pub -- 1
cosign verify --key cosign.pub docker.elastic.co/elasticsearch/elasticsearch:7.7.1 -- 2

 

1. 컨테이너의 서명을 검정하기 위한 퍼블릭키를 다운로드 받습니다.

2. 해당 컨테이너가 유효한지 검증 요청을 보냅니다.

엘라스틱용 도커 네트워크 생성

엘라스틱 서치와 키바나를 띄울 도커 네트워크를 생성합니다.

docker network create elastic

이전 스탭에서 받은 엘라스틱 서치에 이미지를 기반으로 컨테이너를 생성합니다.

docker run --name es01 --net elastic -p 9200:9200 -it docker.elastic.co/elasticsearch/elasticsearch:7.7.1

이제 엘라스틱 서치와 연동할 키바나 이미지를 내려 받습니다.

docker pull docker.elastic.co/kibana/kibana:7.7.1

아까전에 받은 이미지를 기반으로 컨테이너를 생성합니다.

docker run --name kib-01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:7.7.1

 

참조

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

 

Install Elasticsearch with Docker | Elasticsearch Guide [8.8] | Elastic

The container runs Elasticsearch as user elasticsearch using uid:gid 1000:0. Bind mounted host directories and files must be accessible by this user, and the data and log directories must be writable by this user.

www.elastic.co

https://www.elastic.co/guide/en/kibana/current/docker.html

 

Install Kibana with Docker | Kibana Guide [8.8] | Elastic

If replacing kibana.yml with a custom version, be sure to copy the defaults to the custom file if you want to retain them. If not, they will be "masked" by the new file.

www.elastic.co