Elastic installation



1、 Introduction to elastic search













2Elasticsearch installation

1. Remember to install with docker

docker pull elasticsearch:7.2.0

2. Start es

docker run –name elasticsearch -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” -d elasticsearch:7.2.0

3.Modify configuration to solve cross domain access problem

-> docker exec -it elasticsearch /bin/bash

-> cd /usr/share/elasticsearch/config/

-> vi elasticsearch.yml

#Add something to solve the cross domain problem

http.cors.enabled: true

http.cors.allow-origin: “*”

#Restart the container

-> exit

-> docker restart elasticsearch

Installing IK word breaker

ES’s own word segmentation device is not very friendly to Chinese word segmentation, so we download the open source IK word breaker to solve this problem. Pay attention to the same version!

->docker exec -it elasticsearch /bin/bash
->cd /usr/share/elasticsearch/plugins/
 ->elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.2.0/elasticsearch-analysis-ik-7.2.0.zip
 ->Docker restart elasticsearch can then verify that the installation is successful in dev tools of kibana interface


3、 Kibana installation

->docker pull kibana:7.2.0


-> docker run –name kibana –link=elasticsearch:test -p 5601:5601 -d kibana:7.2.0

-> docker start kibana

Kibana is available in more than 6.7. And bring it in the installation package. The modification method is as follows:

->docker exec -it kibana /bin/bash
 ->cd config
 ->vi kibana.yml 
 stay kibana.yml Add a new line in the configuration file:
 -> i18n.locale: "zh-CN" 
 Restart the container after saving.