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
     
  • 相关阅读:
    Requests库入门——应用实例-网络图片的爬取与保存(好看的小姐姐≧▽≦)
    Python Requests库简单入门
    Python BeautifulSoup库基础及一般元素提取方法
    Coloring a Tree(耐心翻译+思维)
    Python jieba库的使用说明
    竖式除法模拟
    Pythagorean Triples毕达哥斯拉三角(数学思维+构造)
    C++ STL中的Binary search(二分查找)
    Polycarp and Letters(set首战!)
    Java多线程干货系列—(一)Java多线程基础
  • 原文地址:https://www.cnblogs.com/lizhi221/p/6814207.html
Copyright © 2011-2022 走看看