docker pull elasticsearch:7.8.0

docker run -id \
--restart=always \
--name=elasticsearch7.8.0 \
-p 9200:9200 \
-p 9300:9300 \
-v /etc/localtime:/etc/localtime \
-e "discovery.type=single-node" \
-e TZ='Asia/Shanghai' \
-e LANG="en_US.UTF-8" \
elasticsearch:7.8.0

Elasticsearch 7.8.0 sql 插件安装

1.获取elasticsearch容器的ID

docker ps   

2.进入elasticsearch的docker容器

docker exec -it 容器ID /bin/bash

3.安装elasticsearch对应的elasticsearch-sql插件


./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.8.0.0/elasticsearch-sql-7.8.0.0.zip

elasticsearch-sql 插件地址github https://github.com/NLPchina/elasticsearch-sql