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

相关推荐
1名持续学习的码农1 天前
GPT Plus、GPT Pro用户第一次用Codex,项目权限和Git分支怎么设置?
人工智能·git·gpt·elasticsearch·ai编程·codex
小罗水1 天前
附录A 各微服务完整 application.yml 配置汇总
数据库·elasticsearch·微服务
Elasticsearch1 天前
使用 Gemma、Hugging Face 和 Elasticsearch 构建 RAG 系统
elasticsearch
Elasticsearch1 天前
使用 NVIDIA NeMo Retriever、Unstructured 和 Elasticsearch 处理非结构化数据
elasticsearch
上海安当技术1 天前
统一身份认证平台怎么落地?11 个异构业务系统接入 ASP 的完整实施路径
数据库·servlet·架构·kubernetes·jenkins
Elasticsearch1 天前
使用 OpenAI 服务通过 Inference API 实现语义搜索
elasticsearch
yj_xqj1 天前
Docker 基础应用与介绍
运维·docker·容器
AOwhisky1 天前
Docker 深度集成 WasmEdge:容器与 Wasm 的边界正在消失
docker·容器·wasm
PC2005-cloud1 天前
Windows 下 WSL2 + Docker Desktop + Ubuntu 开发环境搭建指南
windows·ubuntu·docker