操作系统:mac系统
1.安装es
docker pull elasticsearch:7.14.0
docker run --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -d elasticsearch:7.14.0
curl http://localhost:9200
docker exec -it es /bin/bash
cd /usr/share/elasticsearch/config/
vi elasticsearch.yml
http.cors.enabled: true
http.cors.allow-origin: "*"
docker restart es
2.安装kibana
docker pull kibana:7.14.0
docker run --name kibana --link=es -p 5601:5601 -d kibana:7.14.0
进入容器
docker exec -it kibana /bin/bash
cd config
vi kibana.yml
elasticsearch.hosts: [ "http://es:9200" ]
ctrl+P+Q退出容器
docker restart kibana
curl http://localhost:5601/app/home
浏览器访问http://localhost:5601/app/home
3.参考地址
参考地址