mac 下 docker 安装elk

elasticsearch 7.6.2

1: 安装docker 环境

 

 2: 网络桥接

创建网络桥接

docker network create esnet

mac 下 docker 安装elk_第1张图片

 

3:执行命令:测试

docker run -d --name es -p 9200:9200 -p 9300:9300 --network=esnet -e "discovery.type=single-node" docker.io/library/elasticsearch:7.6.2

 

4:访问 9200端口

mac 下 docker 安装elk_第2张图片

 

5: 开始用elasticsearch7.6.2   用springboot2.2.6 整合Spring-data-elasticsearch 3.6.0 的版本 

 

kibana:7.6.2 

docker run -d -p 5601:5601 -itd --network=esnet -v /Users/ruyuan/docker/es/config/kibana.yml:/usr/share/kibana/config/kibana.yml  docker.io/library/kibana:7.6.2 

下载中文分词

https://github.com/medcl/elasticsearch-analysis-ik

 wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.6.2/elasticsearch-analy

sis-ik-7.6.2 .zip

Connecting to github.com (13.229.188.59:443)

Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.130.251:443)

elasticsearch-analys 100% |*****************************************************************************|  4398k  0:00:00 ETA

~/elasticsearch/plugins $ ls

elasticsearch-analysis-ik-7.6.2 .zip

~/elasticsearch/plugins $ unzip elasticsearch-analysis-ik-7.6.2 .zip

 

 

 

logstash的安装


docker run -d --restart=always -p 5047:5047 -p 9600:9600 --name logstash -itd --network=esnet -v /Users/ruyuan/docker/logstash/pipeline/:/usr/share/logstash/pipeline/ -v /Users/ruyuan/docker/logstash/config/:/usr/share/logstash/config/ -t docker.io/library/logstash:7.6.2

ruyuandeMacBook-Pro:~ ruyuan$  docker exec -it logstash /bin/bash

root@16cba0d139ef:/# cd /bin/

root@16cba0d139ef:/bin# logstash-plugin install logstash-codec-json_lines

Validating logstash-codec-json_lines

Installing logstash-codec-json_lines

Installation successful

 

你可能感兴趣的:(docker,elasticsearch)