Elasticsearch 7.7.0容器化部署
一、Elasticsearch容器化部署
1.1 Pull Elasticsearch镜像
[root@10-27-0-224 ~]# docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0
1.2 运行Elasticsearch容器
[root@10-27-0-224 ~]# 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"
1.3 修改Elasticsearch配置
[root@10-27-0-224 ~]# vim elasticsearch.yml cluster.name: "elasticsearch7.7.0" network.host: 0.0.0.0 node.name: node0 http.host: 0.0.0.0 http.cors.enabled: true http.cors.allow-origin: "*"
# 拷贝到docker容器中,覆盖原有配置文件 [root@10-27-0-224 ~]# docker cp elasticsearch.yml elastic770:/usr/share/elasticsearch/config
二、组件安装
2.1 安装IK分词插件
[root@10-27-0-224 ~]# docker exec -it elastic770 bash [root@caec54c6b617 elasticsearch]# find / -name elasticsearch-plugin /usr/share/elasticsearch/bin/elasticsearch-plugin [root@caec54c6b617 elasticsearch]#/usr/share/elasticsearch/bin/elasticsearch-plugin install https://jeecgos.oss-cn-beijing.aliyuncs.com/eoafile/elasticsearch-analysis-ik-7.7.0.zip
2.2 安装可视化管理工具
[root@10-27-0-224 ~]# docker run -p 9800:9800 -d --link elastic770:hd containerize/elastichd
三、图形化展示
作者:UStarGao
链接:https://www.starcto.com/Cloud-BigData-AI/208.html
来源:STARCTO
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
UCloud云平台推荐
随便看看
- 2021-02-14MongoDB集合(collection)与其物理文件对照关系查询
- 2021-02-13MySQL目录文件与备份方式解读
- 2021-08-18K8S kubectl高频命令详解
- 2022-10-01MongoDB切换主节点技巧
- 2021-06-27Nginx应用场景详解