首页 > 其他 > 详细

容器部署ES 和 ES head插件

时间:2020-06-10 21:25:41      阅读:49      评论:0      收藏:0      [点我收藏+]

1使用 Docker 拉取ElasticSearch镜像

docker pull elasticsearch:6.8.3



启动镜像,设置初始堆内存和最大内存 也可以调整虚拟机内存

docker run --name=test_es -d -p 9200:9200 -p 9300:9300   -e ES_JAVA_OPTS="-Xms256m -Xmx256m" docker.io/elasticsearch:6.8.3


查看健康状态

[root@localhost jumpserver]# curl ‘192.168.92.140:9200/_cat/health?v‘
epoch              timestamp    cluster               status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1591792125 12:28:45       docker-cluster    yellow          1         1      5   5    0    0        5             0                  -                 50.0%



处理跨域拒绝访问问题:

进入es容器

[root@localhost jumpserver]# docker exec -it 053a34851bb5 bash

cd ./config  

增加红色部分参数

[root@053a34851bb5 elasticsearch]# cat ./config/elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"


安装elasticsearch head插件监控管理

docker pull mobz/elasticsearch-head:5

docker run -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5


在浏览器中打开elasticsearch-head页面,填入ElasticSearch地址

技术分享图片

容器部署ES 和 ES head插件

原文:https://www.cnblogs.com/menkeyi/p/13088682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!