Elasticsearch build (docker version)

Elasticsearch build (docker version)


1. Pull the image

docker pull elasticsearch:7.8.1

2. Create a mirror

docker run -d --name=es7.8.1 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.8.1

3. Enter the mirror to modify the config/elasticsearch.yam file, and enable remote connection:

cluster.name: "docker-cluster"
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
  
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1

4. New control panel:

docker pull mobz/elasticsearch-head:5

5. Create a console mirror:

docker run -d --name es_admin -p 9100:9100 mobz/elasticsearch-head:5

Then you can view the console with ip:9100

6. Download the corresponding version of the Chinese word segmenter extension:

下载地址:https://github.com/medcl/elasticsearch-analysis-ik/releases

Then enter the plugins directory in the container, create a new folder ik and
put the compressed package into the ik folder:
docker cp elasticsearch-analysis-ik-7.8.1.zip a6e122a23026:/tmp
into the container, unzip it to the ik directory,
restart the current Container: docker restart es7.8.1

Word segmentation request

Guess you like

Origin blog.csdn.net/XiaoAnGeGe/article/details/107957966