24년 11월 이전/Log
Elasticsearch 설치하기 (Binary)
Gurumee
2021. 9. 21. 16:36
반응형
개요
이 문서에서는 다음 환경에서 Elasticsearch
를 설치하는 것에 대해 다룬다.
- CentOS 8
설치를 위해서 wget
을 사용할 것이므로, 해당 패키지 설치가 필요하다.
$ sudo yum install wget -y
설치
문서를 작성하는 현재 (21년 09월 21일) 기준 Elasticsearch
의 최신 버전은 7.15이나 나는 7.14를 설치한다. 다음 명령어로 손쉽게 설치할 수 있다.
# 7.14 압축 파일 다운로드
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.14.1-linux-x86_64.tar.gz
# 압축 파일 해제
$ tar -xzf elasticsearch-7.14.1-linux-x86_64.tar.gz
# 압축 파일 삭제
$ rm elasticsearch-7.14.1-linux-x86_64.tar.gz
# elasticsearch 디렉토리 이름 변경
$ mv elasticsearch-7.14.1 elasticsearch
실행
실행은 다음과 같이 할 수 있다.
# elasticsearch 디렉토리로 이동
$ cd ~/elasticsearch/
# 엘라스틱 서치 실행
$ ./bin/elasticsearch
...
[2021-09-21T07:20:19,068][INFO ][o.e.i.g.DatabaseRegistry ] [es-master] database file changed [/tmp/elasticsearch-8638168095542505465/geoip-databases/mtdvomwxQGyyep5huG3AGQ/GeoLite2-City.mmdb], reload database...
[2021-09-21T07:20:19,702][INFO ][o.e.i.g.GeoIpDownloader ] [es-master] geoip database [GeoLite2-ASN.mmdb] is up to date, updated timestamp
[2021-09-21T07:20:19,942][INFO ][o.e.i.g.GeoIpDownloader ] [es-master] geoip database [GeoLite2-City.mmdb] is up to date, updated timestamp
[2021-09-21T07:20:20,030][INFO ][o.e.i.g.GeoIpDownloader ] [es-master] geoip database [GeoLite2-Country.mmdb] is up to date, updated timestamp
데몬으로써 실행도 가능하다.
$ ./bin/elasticsarch -d
데몬으로 실행한 후 curl
을 이용해서 실제로 elasticsearch
가 실행되는지도 확인할 수 있다.
$ curl localhost:9200
{
"name" : "es-master",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "Lu6anK-QR4qLET7wpKTiNQ",
"version" : {
"number" : "7.14.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "66b55ebfa59c92c15db3f69a335d500018b3331e",
"build_date" : "2021-08-26T09:01:05.390870785Z",
"build_snapshot" : false,
"lucene_version" : "8.9.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
참고
728x90
반응형