본 문서는 Elasticsearch 6.6.1 버전을 기준으로 작성된 문서이며, 본 문서에 설명된 인증 플러그인인 Buckler 는 6.6.1 버전의 Elasticsearch만 지원합니다.
- 원격 Elasticsearch 는 node1, node2 번 서버 또는 별도의 서버에 설치.
wget 명령으로 파일 다운로드
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.tar.gz
압축 해제
$ tar -xvf elasticsearch-6.6.1.tar.gz
Buckler 플러그인 설치 ( <elasticsearch install dir>/bin 경로로 이동 )
$ cd <elaticsearch install dir>/bin
$ ./elasticsearch-plugin install -b https://packages.atlassian.com/maven/com/atlassian/elasticsearch/buckler-plugin/2.1.0/buckler-plugin-2.1.0-6.6.1.zip?_ga=2.95425499.615428800.1572829411-1175130479.1570683888
Buckler 플러그인 제거( <elasticsearch install dir>/bin 경로로 이동 )
$ cd <elaticsearch install dir>/bin
$ ./elasticsearch-plugin remove buckler
$ ./elasticsearch-plugin list => 설치되어 있는 plugin 목록 확인 가능.
원격 Elasticsearch 인스턴스에 대해 최소한 기본 HTTP 인증을 활성화 작업
$ cd elaticsearch install dir>/config
$ mkdir buckler
$ cd buckler
$ vi buckler.yml
auth.basic.http.enabled: true
auth.basic.username: <username>
auth.basic.password: <password>

방화벽 오픈 (elastcisearch port 를 9200 으로 사용할 경우)
$ firewall-cmd --permanent --zone=public --add-port=9200/tcp
Elasticsearch 인스턴스 실행
$ cd <elaticsearch install dir>/bin
$ ./elasticsearch -d
** 기타 사항 ***
$ ./elasticsearch -d -v
=> -v 옵션을 주면 elastic log 에 상세 정보를 확인 할 수 있음.
Elasticsearch 인스턴스 실행 실패 case
1. elastic search log 에서 아래 내용과 같은 원인으로 Elasticsearch 인스턴스 실행이 실패 하는 경우 있음
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2. 대처 방법
2-1. max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
- etc/security/limits.conf 파일의 맨 하단에 아래 내용 추가 (4줄)
* hard nofile 65536
* soft nofile 65536
* hard nproc 65536
* soft nproc 65536
2-2. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
- /etc/sysctl.conf 파일에 아래 내용 추가 (1줄)
vm.max_map_count=262144
2-3. 위 두가지 작업 완료 후 시스템 재부팅.