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

Elasticsearch集群

时间:2018-07-03 14:49:59      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:html   usr   增加用户   nod   lock   ica   cluster   sys   discovery   

详细Elasticsearch安装:

https://www.cnblogs.com/littlehb/p/8406378.html

安装之前需先优化内核:

https://www.cnblogs.com/kgdxpr/p/3342102.html

简单安装:

--下载
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.zip
unzip elasticsearch-6.3.0.zip
mv elasticsearch-6.3.0 elasticsearch

--增加用户
adduser elasticsearch
echo elasticsearch | passwd --stdin elasticsearch
chown -R elasticsearch /usr/local/elasticsearch

--启动
su elasticsearch -l -c "/usr/local/elasticsearch/bin/elasticsearch"

修改Elasticsearch的jvm配置(为服务器总内存的一半)

vi /usr/local/elasticsearch/config/jvm.options

-Xms4g
-Xmx4g

master配置文件:

cluster.name: bigData
node.name: master_node
node.master: true
node.data: false
network.host: 10.10.14.170
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["10.10.14.170:9300", "10.10.14.171:9300", "10.10.14.172:9300", "10.10.14.173:9300"]

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

discovery.zen.minimum_master_nodes: 1
discovery.zen.ping_timeout: 10s

gateway.recover_after_nodes: 3
gateway.recover_after_time: 5m
gateway.expected_nodes: 2

http.cors.enabled: true
http.cors.allow-origin: "*"

path.repo: /usr/local/test    #做快照用的

 

dataNode配置文件:

cluster.name: bigData
node.name: node1
node.master: false
node.data: true
network.host: 10.10.14.171
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["10.10.14.170:9300", "10.10.14.171:9300", "10.10.14.172:9300", "10.10.14.173:9300"]

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

discovery.zen.minimum_master_nodes: 1
discovery.zen.ping_timeout: 10s

gateway.recover_after_nodes: 3
gateway.recover_after_time: 5m
gateway.expected_nodes: 2

path.repo: /usr/local/test

 

Elasticsearch集群

标签:html   usr   增加用户   nod   lock   ica   cluster   sys   discovery   

原文地址:https://www.cnblogs.com/kgdxpr/p/9257581.html

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