elasticsearch下Docker的安装步骤
本篇内容主要讲解“elasticsearch下Docker的安装步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“elasticsearch下Docker的安装步骤”吧!
网站建设哪家好,找创新互联!专注于网页设计、网站建设、微信开发、成都微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了盐边免费建站欢迎大家使用!
elasticsearch(Docker)
标签(空格分隔): Elasticsearch
[toc]
1. 安装
# 下载 docker pull docker.elastic.co/elasticsearch/elasticsearch:6.6.2 # 启用 docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.6.2
使用集群部署
## 桥接启动 docker run -d \ --name=a-pro-es1 \ -p 9200:9200 \ -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \ --ulimit memlock=-1:-1 \ --ulimit nofile=65536:65536 \ -v /opt/docker/elasticsearch/es1.yml:/usr/share/elasticsearch/config/elasticsearch.yml \ -v /opt/docker/elasticsearch/data:/usr/share/elasticsearch/data \ -v /opt/docker/elasticsearch/logs:/usr/share/elasticsearch/logs \ elasticsearch:5.3 ## 主机模式启动 docker run -d --name=a-pro-es1 --net=host -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 -v /opt/docker/elasticsearch/es1.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /opt/docker/elasticsearch/data:/usr/share/elasticsearch/data -v /opt/docker/elasticsearch/logs:/usr/share/elasticsearch/logs docker.elastic.co/elasticsearch/elasticsearch:6.6.2
2. 安装(elasticsearch-head)
docker run -p 9100:9100 mobz/elasticsearch-head:5
3. 安装同步MySQL数据插件
logstash-input-jdbc # docker 安装logstash (需与elasticsearch版一致) docker run --rm -it -v /opt/docker/logstash/lib:/opt/logstash/lib -v /opt/docker/logstash/sql:/opt/logstash/sql -v /opt/docker/logstash/settings/logstash.yml:/usr/share/logstash/config/logstash.yml docker.elastic.co/logstash/logstash:6.6.2
4. 日志接入(elasticsearch)
处理日志和输出到Elasticsearch,您可以使用日志记录工具,如rsyslog(www.rsyslog.com),Logstash(www.elastic.co/products/logstash),或Apache Flume(http://flume.apache.org) 搜索和可视化界面分析这些日志,你可以使用Kibana(www.elastic.co/产品/ kibana)
到此,相信大家对“elasticsearch下Docker的安装步骤”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
网页名称:elasticsearch下Docker的安装步骤
URL分享:http://myzitong.com/article/jpdios.html