Elasticsearch Deployment Documentation (Ubuntu 14.04)

Source: Internet
Author: User
Tags documentation

Elasticsearch Deployment Documentation (Ubuntu 14.04)

Reference links

    • Https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
    • Https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html#setup-configuration
    • Https://www.elastic.co/guide/en/elasticsearch/guide/current/_file_descriptors_and_mmap.html
    • Https://www.elastic.co/guide/en/elasticsearch/guide/current/_important_configuration_changes.html
    • Https://github.com/grigorescu/Brownian/wiki/ElasticSearch-Configuration

Installing Java

sudo add-apt-repository ppa:webupd8team/javasudo apt-get  updatesudo apt-get Install oracle-java8-installersudo apt-get install oracle-java8-set-default

Installing Elasticsearch

Wget-qo-https://packages.elastic.co/gpg-key-elasticsearch | sudo apt-key add-"Deb Http://packages.elastic.co/elasticsearch/1.6/debian Stable main" | sudo tee-a/etc/apt/sources.listsudo apt-get  updatesudo apt-get  Install Elasticsearchsudo update

Elasticsearch each directory description
type description location
Home Home of Elasticsearch Installation /usr/share/elasticsearch
Bin Binary scripts including Elasticsearch to start a node /usr/share/elasticsearch/bin
Conf Configuration Files Elasticsearch.yml and Logging.yml /etc/elasticsearch
Conf Environment variables including heap size,file descriptors /etc/default/elasticsearch
Data The location of the data files /var/lib/elasticsearch/
Logs Log Files Location /var/log/elasticsearch
Plugins Plugin Files Location /usr/share/elasticsearch/plugins

Configuration

Es_heap_size

# modified in/etc/default/elasticsearch: es_heap_size=4g    #不要超过32g, if the entire machine only deploys ES, half of the memory is used in Java HEAP, The other half gives Lucene

File descriptors

Cat <<EOF>>/etc/security/65535eof# in /etc/default/  Modified in Elasticsearch: max_open_files=65535

Virtual Memory
Cat <<EOF>>/etc/sysctl.confvm.max_map_count=262144-P

Memory Settings

# in/etc/elasticsearch/true# modified in /etc/default/Elasticsearch: Max_locked_ MEMORY=unlimited

Other

In/etc/elasticsearch/elasticsearch.yml Modify: # Cluster name, same set of group, name to set the same cluster.name:elasticsearch_production# node name Node.name:elasticsearch_ 001_data# data path, can be configured multiple, comma separated, note the permissions of the directory, to ensure that elasticsearch users can write Path.data:/path/to/data1,/path/to/data2 # Log path, note the permissions of the directory to ensure that Elasticsearch users can write Path.logs:/path/to/logs# Plugin path path.plugins:/path/to/plugins# This property is the minimum number of nodes that are to form a cluster that has the primary node eligibility and is connected to each other # (numbers of Master-eligible nodes/2) +1. The following values are set in the case of 3 with primary node eligibility # Because of the number of nodes, can be increased later, or reduced, so the configuration can dynamically modify the Discovery.zen.minimum_master_nodes:2# Recovery Control gateway.recover_after_nodes:2Gateway.expected_nodes:3gateway.recover_after_time:5m# off multicast, with unicast. and specify at least one host discovery.zen.ping.multicast.enabled that can accept unicast:falsediscovery.zen.ping.unicast.hosts: ["192.168.2.1:9300","192.168.2.2:9300","192.168.2.3:9300"]

Start

sudo/etc/init.d/Elasticsearch start# Verify that some of the above configurations are configured successfully curl localhost:9200/_nodes/process?pretty

Elasticsearch Deployment Documentation (Ubuntu 14.04)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.