docker容器在线安装plugin
进入容器,然后安装。
docker exec -it 018a1586b7ef /bin/bash
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.4.0/elasticsearch-analysis-ik-6.4.0.zip
竟然报错了
java.io.EOFException: Unexpected end of ZLIB input stream
花了大半天的时间下载都成功了,却安装失败,这不浪费时间吗。
docker容器离线安装plugin
离线准备好zip包,将zip拷贝进容器,然后进入容器,然后安装。
cp /Users/zhuhuiyuan/Downloads/elasticsearch-analysis-ik-6.4.0.zip /mydata/elasticsearch/
cd /mydata/elasticsearch/
docker cp elasticsearch-analysis-ik-6.4.0.zip 018a1586b7ef:/usr/share/elasticsearch
docker exec -it 018a1586b7ef /bin/bash
重点命令:
elasticsearch-plugin install file:\/usr/share/elasticsearch/elasticsearch-analysis-ik-6.4.0.zip
安装成功