zoukankan      html  css  js  c++  java
  • 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
     
  • 相关阅读:
    Oracle错误——ORA-12704:字符集不匹配
    nodejs 错误问题解决
    windows 卸载 node.js 怎么卸载搜索
    Git安装配置及基本使用(windows)
    破解photoshop cs6 mac
    将text中的数字转换为字符串
    JavaScript 为什么不推荐使用 eval?
    Permission denied (publickey).
    linux 命令
    恢复 git reset -hard 的误操作
  • 原文地址:https://www.cnblogs.com/lizhi221/p/6814207.html
Copyright © 2011-2022 走看看