Docker安装ElasticSearch和Kibana

创建容器elasticsearch

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

安装analysis-ik中文分词插件

进入插件目录
cd /usr/share/elasticsearch/plugins/

GitHub原链接
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.6.4/elasticsearch-analysis-ik-5.6.4.zip

镜像加速下载链接
elasticsearch-plugin install https://hub.fastgit.org/medcl/elasticsearch-analysis-ik/releases/download/v7.2.0/elasticsearch-analysis-ik-7.2.0.zip

重启容器(在主机执行)
docker restart elasticsearch

创建Kibana容器

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

访问 host:5601 ,查看是否成功

posted @ 2020-11-05 23:05  juyss  阅读(121)  评论(0编辑  收藏  举报