• Elasticsearch——起步


    1、下载

    地址:https://www.elastic.co/downloads/elasticsearch

    2、解压

    unzip elasticsearch-1.7.0.zip
    

    3、启动

     mv elasticsearch-1.7.0 elasticsearch
    
    cd elasticsearch
    
    bin/elasticsearch
    

    结果如下:

    [root@localhost elasticsearch]# bin/elasticsearch
    [2015-07-19 15:08:06,513][INFO ][node                     ] [Brass] version[1.7.0], pid[2482], build[929b973/2015-07-16T14:31:07Z]
    [2015-07-19 15:08:06,514][INFO ][node                     ] [Brass] initializing ...
    [2015-07-19 15:08:06,668][INFO ][plugins                  ] [Brass] loaded [], sites []
    [2015-07-19 15:08:06,802][INFO ][env                      ] [Brass] using [1] data paths, mounts [[/ (/dev/sda2)]], net usable_space [12.2gb], net total_space [17.3gb], types [ext4]
    [2015-07-19 15:08:10,858][INFO ][node                     ] [Brass] initialized
    [2015-07-19 15:08:10,858][INFO ][node                     ] [Brass] starting ...
    [2015-07-19 15:08:11,065][INFO ][transport                ] [Brass] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.137.2:9300]}
    [2015-07-19 15:08:11,096][INFO ][discovery                ] [Brass] elasticsearch/txjyLy14SW6yVwAjjFP2-g
    [2015-07-19 15:08:14,904][INFO ][cluster.service          ] [Brass] new_master [Brass][txjyLy14SW6yVwAjjFP2-g][localhost.localdomain][inet[/192.168.137.2:9300]], reason: zen-disco-join (elected_as_master)
    [2015-07-19 15:08:14,940][INFO ][http                     ] [Brass] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.137.2:9200]}
    [2015-07-19 15:08:14,940][INFO ][node                     ] [Brass] started
    [2015-07-19 15:08:15,056][INFO ][gateway                  ] [Brass] recovered [0] indices into cluster_state
    

    4、验证

    curl 'http://localhost:9200/?pretty'
    

    结果如下:

    {
      "status" : 200,
      "name" : "Brass",
      "cluster_name" : "elasticsearch",
      "version" : {
        "number" : "1.7.0",
        "build_hash" : "929b9739cae115e73c346cb5f9a6f24ba735a743",
        "build_timestamp" : "2015-07-16T14:31:07Z",
        "build_snapshot" : false,
        "lucene_version" : "4.10.4"
      },
      "tagline" : "You Know, for Search"
    }
    

    5、关闭

     curl -XPOST 'http://localhost:9200/_shutdown'
    

    结果如下:

    [2015-07-19 15:10:38,521][INFO ][action.admin.cluster.node.shutdown] [Brass] [cluster_shutdown]: requested, shutting down in [1s]
    [2015-07-19 15:10:39,526][INFO ][action.admin.cluster.node.shutdown] [Brass] [cluster_shutdown]: done shutting down all nodes except master, proceeding to master
    [2015-07-19 15:10:39,536][INFO ][action.admin.cluster.node.shutdown] [Brass] shutting down in [200ms]
    [2015-07-19 15:10:39,746][INFO ][action.admin.cluster.node.shutdown] [Brass] initiating requested shutdown...
    [2015-07-19 15:10:39,746][INFO ][node                     ] [Brass] stopping ...
    [2015-07-19 15:10:39,822][INFO ][node                     ] [Brass] stopped
    [2015-07-19 15:10:39,822][INFO ][node                     ] [Brass] closing ...
    [2015-07-19 15:10:39,835][INFO ][node                     ] [Brass] closed
    

      

  • 相关阅读:
    have you declared this activity in your AndroidManifest.xml?
    Android收回输入法的实现
    Android手机Home键重写
    Android屏幕点击事件重写
    拖动ListView列表时背景变黑
    AFNetworking vs ASIHTTPRequest vs MKNetworkKit
    libgif.so
    android.support.v4.widget.DrawerLayout
    Titanium vs PhoneGap
    Non-constant Fields in Case Labels
  • 原文地址:https://www.cnblogs.com/zengdan-develpoer/p/4659997.html
Copyright © 2020-2023  润新知