elasticsearch*3 + Es-Head + kibana Docker集羣

 
拉取docker鏡像
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.0.0
docker pull docker.elastic.co/kibana/kibana:7.0.0
docker pull mobz/elasticsearch-head:5

內核參數優化html

echo "vm.max_map_count=262144" >> /etc/sysctl.conf && sysctl -p
vim /etc/security/limits.conf 
# 表示任何一個用戶能夠打開的最大的文件描述符數量
*               soft    nofile         655350 
*               hard    nofile         655350
# 表示任何一個用戶能夠打開的最大的進程數
*               soft    nproc          655350 
*               hard    nproc          655350
* soft memlock unlimited
* hard memlock unlimited

 下載docker-compose文件git

git clone https://github.com/wubolive/docker-elk7.0.git

 設置elasticsearsh目錄權限github

cd docker-elk7.0
chmod g+rwx -R elasticsearch
chown 1000:0 -R elasticsearch

 啓動ES集羣docker

docker-compose up -d

 查看啓動狀態vim

[root@elk-stask ~]# docker-compose ps 
  Name                 Command               State                Ports               
-------------------------------------------------------------------------------------
Es-Head     /bin/sh -c grunt server          Up      0.0.0.0:9100->9100/tcp           
Es-Master   /usr/local/bin/docker-entr ...   Up      0.0.0.0:9200->9200/tcp, 9300/tcp 
Es-Node1    /usr/local/bin/docker-entr ...   Up      9200/tcp, 9300/tcp               
Es-Node2    /usr/local/bin/docker-entr ...   Up      9200/tcp, 9300/tcp               
kibana      /usr/local/bin/kibana-docker     Up      0.0.0.0:5601->5601/tcp

集羣啓動將會暴露3個端口:bash

  • 0.0.0.0:9100   (elasticsearch)
  • 0.0.0.0:9200   (elasticsearch-Head)
  • 0.0.0.0:5601   (kibana)

 github主頁:https://github.com/wubolive/docker-elk7.0elasticsearch

相關文章
相關標籤/搜索