하기 명령어를 쭉~ 치면 정상 설치가 된다. 원하는 버전을 받고 싶다면 2번에서 버전을 명시해 주면된다.
<설치 미리보기>
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt update
sudo apt install elasticsearch
sudo vi /etc/elasticsearch/elasticsearch.yml
sudo systemctl start elasticsearch
service elasticsearch status
service elasticsearch stop
1. gpg 키 설정
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
2. ES 소스 리스트 추가.
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
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
7.15.2
3. apt 업뎃
sudo apt update
4. ES 설치
sudo apt install elasticsearch
5. ES 설정
sudo vi /etc/elasticsearch/elasticsearch.yml
초기에는 하기 설정만 잡아서 사용해도 전혀 문제 없다.
network.host: localhost
하기 설정은 필요할 때만 활성화 하여 사용하면 된다.
보안상 ip는 '-' 처리를 하였다. 나머지 설정들은 es doc 을 참조해서 공부하면 좋다.
v6 버전 때와 v7버전때의 설정 값 명이 다르니 이점 유의해서 적용해야한다.
cluster.name: my-index-engine
node.name: master-node-1
node.master: true
node.data: true
node.ingest: false
path.data: /appl/lib/elasticsearch
path.logs: /appl/log/elasticsearch
path.repo: /appl/snapshot/elasticsearch
network.host: "_site_"
network.bind_host: 0.0.0.0
network.publish_host: 퍼블릭 IPv4 주소.196
#discovery.zen.minimum_master_nodes: 1
discovery.seed_hosts: ['퍼블릭 IPv4 주소:9300']
http.port: 9200
transport.port: 9300
#http.cors.enabled: true
#http.cors.allow-origin: "*"
#bootstrap.system_call_filter: false
thread_pool.write.queue_size: 10000
thread_pool.search.queue_size: 10000
script.max_compilations_rate: 1000/1m
6. ES 실행
6.1 실행
sudo systemctl start elasticsearch
6.2 확인
service elasticsearch status
6.3 정지
service elasticsearch stop
7. ES 정보 확인
curl localhost:9200
관련 에러
[cluster.initial_master_nodes] is empty on this node:
MasterNotDiscoveredException: null
Authentication is required to stop 'elasticsearch.service'
'programmer > Elasticsearch' 카테고리의 다른 글
update nested field in an index of elasticsearch with java api (0) | 2021.12.06 |
---|---|
4. [Elasticsearch] kibana 설치 (0) | 2021.12.03 |
2. [Elasticsearch] Ubuntu EC2 접속 하기 (0) | 2021.12.03 |
1. [Elasticsearch] AWS EC2 생성하기 (0) | 2021.12.03 |
Ansible permission error 해결 (1) | 2021.07.28 |