安装ES和Kibana和IK分词器

 

  1. docker pull elasticsearch:7.12.1 docker pull kibana:7.12.1
  2. docker run -d \
      --name es \
        -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
        -e "discovery.type=single-node" \
        -v es-data:/usr/local/elasticsearch7.12.1/data \
        -v es-plugins:/usr/local/elasticsearch7.12.1/plugins \
        -v es-logs:/usr/local/elasticsearch7.12.1/logs \
        --privileged \
        --network es-net \
        -p 9200:9200 \
        -p 9300:9300 \
    elasticsearch:7.12.1
  3. docker run -d \ 
    --name kibana \ 
    -e ELASTICSEARCH_HOSTS=http://es:9200 \ 
    --network=es-net \ 
    -p 5601:5601  \ 
    kibana:7.12.1
  4. 安装IK分词器

    1.  进入容器内部

      docker exec -it es bash

    2. 进入bin目录

      cd /usr/share/elasticsearch/bin

       

    3. 在线下载并安装

      ./elasticsearch-plugin  install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.12.1/elasticsearch-analysis-ik-7.12.1.zip

    4. 退出

      exit

    5. 重启容器

      docker restart es

  5.  

转自:https://blog.csdn.net/djdjfjf1/article/details/134775443

posted @ 2024-09-24 16:35  冷风5997  阅读(9)  评论(0编辑  收藏  举报