首页 > 代码库 > elasticsearch集群安装配置
elasticsearch集群安装配置
环境:CentOS release 6.7 (Final)
java version "1.8.0_77"
IP:192.168.98.161、192.168.98.162、192.168.98.163
安装见《简单安装elasticsearch步骤》
配置文件elasticsearch.yml:
192.168.98.161:
cluster.name : LZ
node.name : "lz-1"
path.data : "/tmp/elasticsearch/data"
path.logs : "/tmp/elasticsearch/logs"
network.host : "192.168.98.161"
network.port : "9200"
node.master : true
node.data : true
discovery.zen.ping.unicast.hosts : ["192.168.98.161","192.168.98.162","192.168.98.163"]
192.168.98.162:
cluster.name : LZ
node.name : "lz-2"
path.data : "/tmp/elasticsearch/data"
path.logs : "/tmp/elasticsearch/logs"
network.host : "192.168.98.162"
network.port : "9200"
node.master : false
node.data : true
discovery.zen.ping.unicast.hosts : ["192.168.98.161","192.168.98.162","192.168.98.163"]
192.168.98.163:
cluster.name : LZ
node.name : "lz-3"
path.data : "/tmp/elasticsearch/data"
path.logs : "/tmp/elasticsearch/logs"
network.host : "192.168.98.163"
network.port : "9200"
node.master : false
node.data : true
discovery.zen.ping.unicast.hosts : ["192.168.98.161","192.168.98.162","192.168.98.163"]
./bin/elasticsearch -d ###后台运行elasticsearch
查看集群节点列表:
[root@ELK1 src]# curl ‘192.168.98.161:9200/_cat/nodes?v‘
host ip heap.percent ram.percent load node.role master name
192.168.98.161 192.168.98.161 7 81 0.38 d * lz-1
192.168.98.162 192.168.98.162 2 92 0.49 d - lz-2
192.168.98.163 192.168.98.163 6 93 0.79 d - lz-3
查看索引信息:
[root@ELK1 ~]# curl 192.168.98.161:9200/_cat/indices
green open mysql-slowlog-2016.04.12 5 1 14 0 146.5kb 73.2kb
green open .kibana 1 1 5 0 41.1kb 20.5kb
green open tomcat 5 1 30 0 81.9kb 40.9kb
green open mysql-slowlog 5 1 5 0 55kb 27.5kb
elasticsearch集群安装配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。