栏目头部广告

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

三、图形化展示

http://10.27.0.224:9200/

Elasticsearch 7.7.0容器化部署(图1)

http://10.27.0.224:9800/

Elasticsearch 7.7.0容器化部署(图2)

作者:UStarGao
链接:https://www.starcto.com/Cloud-BigData-AI/208.html
来源:STARCTO
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

UCloud云平台推荐


UCloud新用户专属注册连接

UCloud CDN超值特惠专场

UCloud全球云主机(UHost/VPS)大促页面

UCloud快杰云主机大促页面

加载中~
文章详情页广告

随便看看

底部广告
`