码迷,mamicode.com
首页 > 其他好文 > 详细

elasticsearch 集群搭建

时间:2016-03-01 00:45:08      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

需要编辑的文件是config/elasticsearch.yml文件

需要配置的项目有:

# Use a descriptive name for your cluster:
#
 cluster.name: Hadoop
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: nn2
 node.name: ${HOSTNAME}
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
 network.host: 192.168.56.122
#
# Set a custom port for HTTP:
#
# http.port: 9200
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# --------------------------------- Discovery ----------------------------------
#
# Elasticsearch nodes will find each other via unicast, by default.
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
 discovery.zen.ping.unicast.hosts: ["nn1","nn2","dn1"]

在同一个网络中,如果启用多播,就会自动发现,生产环境中建议使用单播,有更好的稳定性。

遇到这个问题,一直以为是自己的网络问题,想偏了。

应该细细阅读配置文件,或者是去官方文档上细细阅读,如果想把ELK应用于生产环境,真得需要对文档熟悉,提高工作的效率。

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html

elasticsearch 集群搭建

标签:

原文地址:http://www.cnblogs.com/huaxiaoyao/p/5229279.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!