您的位置:首页 > 其它

单机模式下的elasticsearch2.3.4安装配置

2017-12-18 16:00 369 查看
单机模式下的elasticsearch2.3.4安装配置

1.tar -zxvf jdk1.8.tar.gz

2.vim /etc/profile

  JAVA_HOME=/work/jdk1.8.0_112

   PATH=.:$JAVA_HOME/bin:elasticsearch2.3.4/bin:$PATH

   CLASSPATH=$JAVA_HOME/bin

   export JAVA_HOME PATH CLASSPATH

3.source /etc/profile

4.mkdir node

   cd node

   tar -zxvf elasticsearch2.3.4.tar.gz

5.cd /node/elasticsearch2.3.4/config

    vim elasticsearch2.3.4.yml

---------------------------------- Cluster -----------------------------------

#

# Use a descriptive name for your cluster:

#

 cluster.name: esCluster

#

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

#         

# Use a descriptive name for the node:

#         

 node.name: es_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.data: /node/es2.3.4_node1/data1

# Path to log files:

# path.logs: /path/to/path 

 path.logs: /node/es2.3.4_node1/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 address to a specific IP (IPv4 or IPv6):

#

# network.host: 192.168.0.1

  network.host: 0.0.0.0

#

# Set a custom port for HTTP:

#

# http.port: 9200

  http.port: 9200

#

# For more information, see the documentation at:

# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>

#

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

#

# 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: ["host1", "host2"]

#

# 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>

#

# ---------------------------------- 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>

#

# ---------------------------------- 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

6.su esadmin

7.chown -R esadmin:esgroup /node/elasticsearch2.3.4

8../bin/elasticsearch

9.curl http://localhost:9200
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: