docker安装es和kibana

1.创建网络

docker network create es-net

2.下载镜像

docker pull elasticsearch:7.12.1

docker pull kibana:7.12.1

docker pull mobz/elasticsearch-head:5

3.运行容器

docker run -d \

--restart=always

--name es7 \

-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \

-e "discovery.type=single-node" \

-v es-data:/usr/local/elasticsearch7.12.1/data \

-v es-plugins:/usr/local/elasticsearch7.12.1/plugins \

-v es-logs:/usr/local/elasticsearch7.12.1/logs \

--privileged \

--network es-net \

-p 9200:9200 \

-p 9300:9300 \

elasticsearch:7.12.1

docker run -d \

--restart=always

--name kibana \

-e ELASTICSEARCH_HOSTS=http://es7:9200 \

--network=es-net \

-p 5601:5601 \

kibana:7.12.1

docker run -d --restart=always --name es-head -p 9100:9100 mobz/elasticsearch-head:5

4.访问页面

http://192.168.88.130:9200/

http://192.168.88.130:5601/app/home

http://192.168.88.130:9100/

5.elasticsearch.yml需要配置跨域,head才可正常连接

vi /usr/share/elasticsearch/config/elasticsearch.yml

http.cors.enabled: true

http.cors.allow-origin: "*"

http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization

http.cors.allow-credentials: true

http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE

相关推荐
csdn_aspnet5 小时前
如何使用 Docker 设置 PostgreSQL
运维·数据库·docker·postgresql·容器
赵文宇(温玉)9 小时前
Docker离线安装
运维·docker·容器
Elasticsearch9 小时前
为什么你的 agent 会忘事:值得在其基础上继续开发的记忆系统必须完成的五项任务
elasticsearch
程序员agions14 小时前
Docker Compose 生产环境配置记录
运维·docker·容器
岳涛16 小时前
ES 9.2 起 ReadOnly 会设 indexing_complete,此前它要单独配
elasticsearch
喜欢吃燃面1 天前
Git 原理与使用(三):标签、多人协作与 Git Flow 落地
大数据·git·elasticsearch
喜欢吃燃面2 天前
Git 原理与使用(二):分支是平行宇宙,远程仓库是共享时空
大数据·git·elasticsearch
Elasticsearch2 天前
PHP 运行时指标:找出导致每个请求增加 24 毫秒耗时的 OPcache
elasticsearch
AR-26710-2 天前
docker Day6——容器数据卷
运维·docker·容器
风翼靓崽2 天前
ES综合日志平台搭建
大数据·elasticsearch·搜索引擎