Steps to Install Elasticsearch

This topic describes how to install Elasticsearch 6.8.1 on a single node and how to configure an Elasticsearch cluster (three nodes).

Install and configure Elasticsearch on a single node

 On Windows
  1. Download Elasticsearch version 6.8.1.
  2. Unzip the downloaded file.
  3. Open the file elasticsearch-6.8.1\config\elasticsearch.yml and make the following changes.

    If you a going to connect to Elasticsearch using the IP address:

    cluster.name: zephyr
    transport.tcp.port: 9300
    node.name: "ESNode1"
    network.host: 192.168.0.1
    network.bind_host: 192.168.0.1
    network.publish_host: 192.168.0.1
    http.port: 9200
    bootstrap.memory_lock: true
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1"]
    indices.query.bool.max_clause_count: 4096

    If you are going to connect to Elasticsearch using the hostname:

    cluster.name: zephyr
    transport.tcp.port: 9300
    node.name: "ESNode1"
    network.host: 127.0.0.1
    network.bind_host: 127.0.0.1
    network.publish_host: 127.0.0.1
    http.port: 9200
    bootstrap.memory_lock: true
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
    indices.query.bool.max_clause_count: 4096
  4. Start Elasticsearch by running the elasticsearch-6.8.1\bin\elasticsearch.bat file.


For more information on system configuration, see Configuring System Settings.

Elasticsearch must be running before you start installing Zephyr Enterprise. You connect Zephyr to Elasticsearch during product installation. To do that, specify either 192.168.0.1:9300, or localhost:9300 on the Configure Elasticsearch page, depending on which configurations you have made in the elasticsearch.yml file:

 On Linux

Install Elasticsearch using the .tar.gz file:

  1. Download Elasticsearch 6.8.1.
  2. Use the following command to unpack the archive:

    tar -xvf elasticsearch-6.8.1.tar.gz
  3. Open the file elasticsearch-6.8.1\config\elasticsearch.yml and make the following changes.

    If you a going to connect to Elasticsearch using the IP address:

    cluster.name: zephyr
    transport.tcp.port: 9300
    node.name: "ESNode1"
    network.host: 192.168.0.1
    network.bind_host: 192.168.0.1
    network.publish_host: 192.168.0.1
    http.port: 9200
    bootstrap.memory_lock: true
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1"]
    discovery.type: single-node
    indices.query.bool.max_clause_count: 4096


    If you are going to connect to Elasticsearch using the hostname:

    cluster.name: zephyr
    transport.tcp.port: 9300
    node.name: "ESNode1"
    network.host: 127.0.0.1
    network.bind_host: 127.0.0.1
    network.publish_host: 127.0.0.1
    http.port: 9200
    bootstrap.memory_lock: true
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
    indices.query.bool.max_clause_count: 4096
  4. Start Elasticsearch by running the following command:

    sudo systemctl start elasticsearch.service

For more information on system configuration, see Configuring System Settings.

Install Elasticsearch using the .rmp file:

  1. Download Elasticsearch 6.8.1.
  2. Install Elasticsearch by running the command below:

    yum install elasticsearch-6.8.1.rpm
  3. Open the /etc/elasticsearch/elasticsearch.yml file for editing and configure it in the following way.

    If you a going to connect to Elasticsearch using the IP address:

    cluster.name: zephyr
    node.name: node-1
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    bootstrap.memory_lock: true
    network.host: 192.168.0.1
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1"]
    indices.query.bool.max_clause_count: 4096

    If you are going to connect to Elasticsearch using the hostname:

    cluster.name: zephyr
    node.name: node-1
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    bootstrap.memory_lock: true
    network.host: 127.0.0.1
    xpack.security.enabled: false
    indices.query.bool.max_clause_count: 4096
  4. Run the command below to open the system configuration file:

    vi /etc/sysconfig/elasticsearch
  5. Uncomment this line:

    MAX_LOCKED_MEMORY=unlimited
  6. Start Elasticsearch by running the following command:

    sudo systemctl start elasticsearch.service

For more information on system configuration, see Configuring System Settings.

Elasticsearch must be running before you start installing Zephyr Enterprise. You connect Zephyr to Elasticsearch during product installation. To do that, specify either 192.168.0.1:9300, or localhost:9300 when prompted to configure Elasticsearch, depending on which configurations you have made in the elasticsearch.yml file:

Configure Elasticsearch
Enter the hostname or IP address and port used by Elasticsearch. For example: localhost:9300.
Multiple Elasticsearch nodes should be separated by comma. For example: localhost:9300,localhost:9301
ES Host URL
[]

Configure an Elasticsearch cluster (3 nodes)

  • The number of Elasticsearch nodes you use in a cluster should be odd. That is, the minimum number of nodes you can use in a cluster is 3.

  • To avoid split-brain, you need to specify an appropriate value for the discovery.zen.minimum_master_nodes parameter. To determine it, follow the rule N/2+1, where N is the number of nodes in the cluster. In a three-node cluster, the parameter should be set to 2 (3/2+1=2 - rounded down to the nearest integer).

 On Windows
  1. Download Elasticsearch version 6.8.1.
  2. Unzip the downloaded file on all three machines.
  3. On each node, open the file elasticsearch-6.8.1\config\elasticsearch.yml and make the following changes:

    #ESNode 1 (192.168.0.1)
    
    cluster.name: zephyr
    transport.tcp.port: 9300
    node.name: "ESNode1"
    network.host: 192.168.0.1
    network.bind_host: 192.168.0.1
    network.publish_host: 192.168.0.1
    http.port: 9200
    bootstrap.memory_lock: true
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1"]
    indices.query.bool.max_clause_count: 4096
  4. Start Elasticsearch on each node by running the elasticsearch-6.8.1\bin\elasticsearch.bat file.

Elasticsearch must be running before you start installing Zephyr Enterprise. You connect Zephyr to Elasticsearch during product installation. To do that, specify the following IP addresses and port numbers on the Configure Elasticsearch page:

192.168.0.1:9300,192.168.0.2:9300,192.168.0.3:9300

 On Linux
  1. Download Elasticsearch 6.8.1 (the RPM file).

  2. Install Elasticsearch in all three machines by using the following command:

    yum install elasticsearch-6.8.1.rpm
  3. On each node, open the /etc/elasticsearch/elasticsearch.yml file for editing and configure it in the following way:

    #ESNode 1 (192.168.0.1)
    
    cluster.name: zephyr
    node.name: node-1
    node.master: true
    node.data: true
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    bootstrap.memory_lock: true
    network.host: 192.168.0.1
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1", "192.168.0.2", "192.168.0.3"]
    discovery.zen.minimum_master_nodes: 2
    indices.query.bool.max_clause_count: 4096
    
    
    #ESNode 2 (192.168.0.2)
    
    cluster.name: zephyr
    node.name: node-2
    node.master: true
    node.data: true
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    bootstrap.memory_lock: true
    network.host: 192.168.0.2
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1", "192.168.0.2", "192.168.0.3"]
    discovery.zen.minimum_master_nodes: 2
    indices.query.bool.max_clause_count: 4096
    
    
    #ESNode 3 (192.168.0.3)
    
    cluster.name: zephyr
    node.name: node-3
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    node.master: true
    node.data: true
    bootstrap.memory_lock: true
    network.host: 192.168.0.3
    xpack.security.enabled: false
    discovery.zen.ping.unicast.hosts: ["192.168.0.1", "192.168.0.2", "192.168.0.3"]
    discovery.zen.minimum_master_nodes: 2
    indices.query.bool.max_clause_count: 4096

    Note:  The discovery.zen.ping.unicast.hosts parameter should contain all the IP addresses used in the cluster.

  4. On all three nodes, run the command below to open the system configuration file:

    vi /etc/sysconfig/elasticsearch
  5. Uncomment this line:

    MAX_LOCKED_MEMORY=unlimited
  6. Start Elasticsearch on all the nodes by running the following command:

    sudo systemctl start elasticsearch.service

Elasticsearch must be running on your nodes before you start installing Zephyr Enterprise. You connect Zephyr to Elasticsearch running on your cluster nodes during product installation. To do that, specify the following IP addresses and port numbers when prompted to configure Elasticsearch:

192.168.0.1:9300,192.168.0.2:9300,192.168.0.3:9300

Configure Elasticsearch
Enter the hostname or IP address and port used by Elasticsearch. For example: localhost:9300.
Multiple Elasticsearch nodes should be separated by comma. For example: localhost:9300,localhost:9301
ES Host URL
[]

After configuring the cluster, change the number_of_shards and number_of_replicas values in the <Zephyr>\tomcat\webapps\flex\WEB-INF\template\zephyr\_settings.json file:

"number_of_shards" : 2,
"number_of_replicas" : 1


For a single node, leave the default values.

For more information on system configuration, see Configuring System Settings.

See Also

Zephyr On-Premise Production Installation
Set Up Zephyr Data Center Cluster
Connecting to an External Database