码迷,mamicode.com
首页 > 其他好文 > 详细

elasticsearch集群安装

时间:2017-08-09 19:08:05      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:sla   imu   权限错误   cas   div   span   .gz   node   als   

1. 下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.tar.gz

2. 解压

为便于识别,解压后起名 elasticsearch-5.5.1-nodex  , elasticsearch-5.5.1-node1  elasticsearch-5.5.1-node2 elasticsearch-5.5.1-node3

elasticsearch-5.5.1-node1 elasticsearch-5.5.1-node3 安装在一台机器。

3. chown   elasticsearch 不允许root启动

groupadd es

useradd -g es es

cd .......

chown -R es ./

4. 修改sysctl.conf   默认 65530太小,否则启动时会报错

echo "vm.max_map_count=655360" >>/etc/sysctl.conf

sysctl -p

5. 启动

cd ....../bin 

./elasticsearch -d

 

配置:

node1 :   master 

vim elasticsearch-5.5.1-node1/config/elasticsearch.yml     

bootstrap.system_call_filter: false  必须,否在会报日志路径等权限错误
cluster.name: xx.elasticsearch
node.name: es-node-1
network.bind_host: 10.112.29.137
network.publish_host: 10.112.29.137
network.host: 10.112.29.137
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.112.29.137", "10.112.29.141", "10.112.29.137:9301"]
discovery.zen.minimum_master_nodes: 2
bootstrap.system_call_filter: false

node2: slave

vim elasticsearch-5.5.1-node2/config/elasticsearch.yml

cluster.name: xx.elasticsearch
node.name: es-node-3
network.bind_host: 10.112.29.141
network.publish_host: 10.112.29.141
network.host: 10.112.29.141
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.112.29.137", "10.112.29.141", "10.112.29.137:9301"]
discovery.zen.minimum_master_nodes: 2
bootstrap.system_call_filter: false

node3: slave 与 master 安装在一台机器(实验一台机器安装多个实例)

vim elasticsearch-5.5.1-node3/config/elasticsearch.yml

cluster.name: xx.elasticsearch
node.name: es-node-3
network.bind_host: 10.112.29.137
network.publish_host: 10.112.29.137
network.host: 10.112.29.137
http.port: 9201
discovery.zen.ping.unicast.hosts: ["10.112.29.137", "10.112.29.141", "10.112.29.137:9301"]
discovery.zen.minimum_master_nodes: 2
transport.tcp.port: 9301

bootstrap.system_call_filter: false

  

  

 

elasticsearch集群安装

标签:sla   imu   权限错误   cas   div   span   .gz   node   als   

原文地址:http://www.cnblogs.com/kisf/p/7326980.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!