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

相关推荐
阿里云大数据AI技术4 小时前
Agentic Search 2.0:从单轮对话迈向企业级 AI 搜索自动驾驶Agent
人工智能·elasticsearch·agent
Elasticsearch7 小时前
你的 AI agent 需要一个不在场证明:Elastic 中 Agent Builder 的可观测性和审计追踪
elasticsearch
leeyi10 小时前
把软件装进不能上网的机房——一套建好了、还没上过战场的交付工程(第101篇)
docker·aigc·agent
Elasticsearch11 小时前
仪表板活动日志:了解哪些 Kibana 仪表板会被使用
elasticsearch
YIAN12 小时前
Docker + Nginx 核心原理扫盲:从环境隔离到反向代理,运维面试必考点
后端·docker·面试
IT大白鼠15 小时前
Docker 实战 ELKF 日志监控:容器日志全栈收集分析方案
运维·docker·容器
小张同学a.1 天前
Docker 容器实战 1—— docker 基础与镜像构建
linux·运维·docker·容器
NJCloud1 天前
Docker 容器技术入门:部署、核心概念与基础命令
运维·docker·容器
2601_962072331 天前
docker自建rustdesk-server远程桌面
运维·docker·容器
pnoker1 天前
从零部署 IoT DC3:四步快速启动实录
物联网·docker·部署