天天看點

windows 單機系統搭建es叢集

作者本地目錄:

windows 單機系統搭建es叢集

1、elasticsearch-7.1.1-node1中elasticsearch.yml配置檔案内容

cluster.name: my-application

#

# ------------------------------------ Node ------------------------------------

#

# Use a descriptive name for the node:

#

node.name: node-1

#

# Add custom attributes to the node:

#

#node.attr.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.memory_lock: true

#

# Make sure that the heap size 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 address to a specific IP (IPv4 or IPv6):

#

network.host: 127.0.0.1

#

# Set a custom port for HTTP:

#

http.port: 9200

#

# For more information, consult the network module documentation.

#

# --------------------------------- Discovery ----------------------------------

#

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

#

discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]

#

# Bootstrap the cluster using an initial set of master-eligible nodes:

#每個節點不同

cluster.initial_master_nodes: ["node-1"]

#

# For more information, consult the discovery and cluster formation module documentation.

#

# ---------------------------------- Gateway -----------------------------------

#

# Block initial recovery after a full cluster restart until N nodes are started:

#

#gateway.recover_after_nodes: 3

#

# For more information, consult the gateway module documentation.

#

# ---------------------------------- Various -----------------------------------

#

# Require explicit names when deleting indices:

#

#action.destructive_requires_name: true

transport.host: 127.0.0.1

transport.tcp.port: 9300

2、elasticsearch-7.1.1-node2中elasticsearch.yml配置檔案内容

cluster.name: my-application

#

# ------------------------------------ Node ------------------------------------

#

# Use a descriptive name for the node:

#

node.name: node-2

#

# Add custom attributes to the node:

#

#node.attr.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.memory_lock: true

#

# Make sure that the heap size 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 address to a specific IP (IPv4 or IPv6):

#

network.host: 127.0.0.1

#

# Set a custom port for HTTP:

#

http.port: 9201

#

# For more information, consult the network module documentation.

#

# --------------------------------- Discovery ----------------------------------

#

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

#

discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]

#

# Bootstrap the cluster using an initial set of master-eligible nodes:

#

cluster.initial_master_nodes: ["node-2"]

#

# For more information, consult the discovery and cluster formation module documentation.

#

# ---------------------------------- Gateway -----------------------------------

#

# Block initial recovery after a full cluster restart until N nodes are started:

#

#gateway.recover_after_nodes: 3

#

# For more information, consult the gateway module documentation.

#

# ---------------------------------- Various -----------------------------------

#

# Require explicit names when deleting indices:

#

#action.destructive_requires_name: true

transport.host: 127.0.0.1

transport.tcp.port: 9301

3、elasticsearch-7.1.1-node3中elasticsearch.yml配置檔案内容

cluster.name: my-application

    #

    # ------------------------------------ Node ------------------------------------

    #

    # Use a descriptive name for the node:

    #

    node.name: node-3

    #

    # Add custom attributes to the node:

    #

    #node.attr.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.memory_lock: true

    #

    # Make sure that the heap size 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 address to a specific IP (IPv4 or IPv6):

    #

    network.host: 127.0.0.1

    #

    # Set a custom port for HTTP:

    #

    http.port: 9202

    #

    # For more information, consult the network module documentation.

    #

    # --------------------------------- Discovery ----------------------------------

    #

    # Pass an initial list of hosts to perform discovery when this node is started:

    # The default list of hosts is ["127.0.0.1", "[::1]"]

    #配置的端口和每個節點的transport.tcp.port端口一直

    discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]

    #

    # Bootstrap the cluster using an initial set of master-eligible nodes:

    #

    cluster.initial_master_nodes: ["node-3"]

    #

    # For more information, consult the discovery and cluster formation module documentation.

    #

    # ---------------------------------- Gateway -----------------------------------

    #

    # Block initial recovery after a full cluster restart until N nodes are started:

    #

    #gateway.recover_after_nodes: 3

    #

    # For more information, consult the gateway module documentation.

    #

    # ---------------------------------- Various -----------------------------------

    #

    # Require explicit names when deleting indices:

    #

    #action.destructive_requires_name: true

    transport.host: 127.0.0.1

    transport.tcp.port: 9302

使用es-head(chrome插件)連接配接叢集伺服器:

windows 單機系統搭建es叢集

備注:

es-head chrome浏覽器插件下載下傳位址 :https://download.csdn.net/download/u013761206/11604040

繼續閱讀