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 分钟前
Docker 命令速查手册
spring cloud·docker
梦梦代码精1 小时前
深度拆解:上门按摩系统如何成为本地生活“到家时代”的新引擎?
docker·小程序·uni-app·开源·生活·开源软件
再战300年1 小时前
通过docker实现mysql一主多从
mysql·docker·容器
不是株2 小时前
ElasticSearch
大数据·elasticsearch·搜索引擎
逸Y 仙X2 小时前
文章三十四:ElasticSearch Script脚本实战
大数据·elasticsearch·搜索引擎·全文检索
刘一说2 小时前
Ubuntu 系统上安装 Docker
linux·ubuntu·docker
askama003 小时前
Ubuntu使用阿里源安装Docker
docker
Mr YiRan3 小时前
Android构建优化:基于Git Diff+TaskGraph
android·git·elasticsearch
Huazzi.3 小时前
Git本地和远程历史不一致问题解决步骤
大数据·git·elasticsearch
RemainderTime3 小时前
(十二)Spring Cloud Alibaba 2023.x:基于 Filebeat 构建轻量级 ELK日志追踪体系
分布式·elk·elasticsearch·微服务·架构·logback