Search Engine/ElasticSearch

Centos7 ElasticSearch 설치

상쾌한기분 2019. 10. 23. 12:21
반응형

Java 버전 확인

> java -version

없으면??

> yum install java  1.8 버전 이상인지 확인하자

elasticserach 7 버전 다운받자

> cd /home
> wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.0-x86_64.rpm
> rpm --install elasticsearch-7.3.0-x86_64.rpm

/etc/elasticsearch.yml 수정

# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /var/lib/elasticsearch
path.data: /home/elasticsearch
#
# Path to log files:
#
#path.logs: /var/log/elasticsearch
path.logs: /home/elasticsearch/log

> jvm.option

힙메모리 설정하자 

 

실행하자

> firewall-cmd --permanent --zone=public --add-port=9200/tcp
> firewall-cmd --reload

> systemctl start elasticsearch.service

> curl -X GET 'localhost:9200'

 

yum으로 설치했을 때, 각 디렉터리의 설명

* /usr/share/elasticsearch : 홈디렉토리
    * bin : 실행 파일 디렉토리
    * plugins : 플러그인
* /etc/elasticsearch : 설정 파일 디렉토리
    * elasticsearch.yml : 주 설정 파일
    * jvm.options : java 설정 파일
    * log4j2.properties : 로그 설정 파일
* /var/lib/elasticsearch : 데이터 저장 디렉토리
* /var/log/elasticsearch : 로그 저장 디렉토리

 

728x90
반응형