zhangdaiscott 发表于 2021-7-5 17:33:30

Docker安装elasticsearch 7.7.0


[*]pull 镜像
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0
[*]运行elasticsearch
docker run --name=elastic770 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /var/docker/elastic/data:/data docker.elastic.co/elasticsearch/elasticsearch:7.7.0测试环境加上-e "discovery.type=single-node"3、安装ik分词插件docker exec -it elastic770 /bin/bash ./bin/elasticsearch-plugin install https://jeecgos.oss-cn-beijing.aliyuncs.com/eoafile/elasticsearch-analysis-ik-7.7.0.zip4、其他配置创建 elasticsearch.ymlcluster.name: "elasticsearch7.7.0"network.host: 0.0.0.0node.name: node0http.host: 0.0.0.0http.cors.enabled: truehttp.cors.allow-origin: "*"拷贝到docker容器中,覆盖原有配置文件docker cp elasticsearch.ymlelastic770:/usr/share/elasticsearch/config点击 http://127.0.0.1:9200 查看ES状态5、安装可视化管理工具docker run -p 9800:9800 -d --link elastic770:hd containerize/elastichd打开 http://localhost:9800 。默认未连接,手工修改连接为 http://hd:9200https://oscimg.oschina.net/oscnet/up-6c54e3f493bce887aefade3428f6fbb37f4.png
页: [1]
查看完整版本: Docker安装elasticsearch 7.7.0