elasticsearch-2.0.0 搭建集群的最简易配置
来源:互联网 发布:php 运费设置源码 编辑:程序博客网 时间:2024/06/10 08:05
2.0.0版本跟以前版本在搭建集群时,配置上跟以前的版本有所不同,但是使用方法还是很简单,只需要对elasticsearch-2.0.0/conf/elasticsearch.yml文件进行三处修改即可,以下是最简单配置的elasticsearch.yml文件,需要修改三处位置,即红色部分:
# ======================== Elasticsearch Configuration =========================
## NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please see the documentation for further information on configuration options:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: WEC
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node1
# Add custom attributes to the node:
#
# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
# path.data: /path/to/data
#
# Path to log files:
#
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.mlockall: true
#
# Make sure that the `ES_HEAP_SIZE` environment variable is set to about half the memory
# available on the system and that the owner of the process is allowed to use this limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind adress to a specific IP (IPv4 or IPv6):
#
network.host: 10.119.199.32
#
# 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: ["10.119.199.33", "10.119.199.32"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
# discovery.zen.minimum_master_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true
在一个集群中,每个机子都应该有自己唯一无二的机器名,所以,node.name: node1这一处配置的node1值 应该各不相同,network.host: 10.119.199.32中的10.119.199.32是本机IP,discovery.zen.ping.unicast.hosts: ["10.119.199.33", "10.119.199.32","10.119.199.34"]中的IP是集群中的IP。
当一个新的节点需要加入已经在运行的elasticsearch集群时,只需要配置上面三处,特别是discovery.zen.ping.unicast.hosts中起码有一个IP是那个正在运行的elasticsearch集群中的一个节点的IP即可实现把新的节点加入集群的目的。
1 0
- elasticsearch-2.0.0 搭建集群的最简易配置
- elasticsearch 集群的搭建
- elasticSearch 2.0搭建集群注意事项
- ElasticSearch集群搭建及配置监视服务
- elasticsearch-2.1.0集群搭建 及其出现的一些问题
- elasticsearch最简单的配置
- Elasticsearch集群环境的搭建步骤
- elasticsearch-2集群搭建的坑
- ElasticSearch的基本用法与集群搭建
- ElasticSearch的基本用法与集群搭建
- Elasticsearch搭建windows环境的集群
- ElasticSearch的基本用法与集群搭建
- ElasticSearch的基本用法与集群搭建
- elasticsearch 集群搭建步骤
- ElasticSearch — 集群搭建
- Elasticsearch集群搭建
- elasticsearch集群搭建
- ElasticSearch集群搭建实例
- Android界面背景图片不显示---三星手机
- unity3d 小心Instantiate的名字非你所要
- java中接口的作用是什么?
- shader编程学习(3)溶解
- SAP HANA分布式系统及高可用性(一)
- elasticsearch-2.0.0 搭建集群的最简易配置
- 在CSDN开通博客专栏后如何发布文章及改进建议(图文)
- binary_search函数用法
- JSP介绍,文件结构及执行过程
- 可自动关闭的JS消息提示框
- JProfiler远程监控
- T-code:SE01,SE93,SE43 经常使用的几个事务码
- shuffle() 函数
- iOS---UITextView: 响应键盘的 return 事件