[Docker] Elasticsearch 설치
1. 엘라스틱서치와 키바나 이미지를 가져온다.
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.6.2
docker pull docker.elastic.co/kibana/kibana:7.6.2
2. 네트워크 생성
docker network create somenetwork
3. 엘라스틱서치와 키바나 컨테이너를 실행한다.
엘라스틱서치
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:latest
키바나
docker run -d --name kibana --net somenetwork -p 5601:5601 kibana:latest
4. nori 형태소 분석기 적용
컨테이너 실행 상태에서 다음 명령어 입력.
docker exec -it [CONTAINER ID] /bin/bash
cd bin
./elasticsearch-plugin install analysis-nori
5. Docker를 로컬 환경에서 설치한 경우, 외부에서도 접속 가능하게 하고 싶다면 공유기의 포트포워딩을 이용한다.
외부 IP 주소와 외부 포트를 이용하여 외부인이 로컬에 설치된 엘라스틱서치와 키바나 서버에 접근할 수 있다.
6. 엘라스틱서치 security 설정하기
https://www.elastic.co/guide/en/kibana/current/docker.html
Install Kibana with Docker | Kibana Guide [7.13] | 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