安装前置条件:
1 jdk>1.8.0_72
2 百度云下载链接: https://pan.baidu.com/s/1uSy8AxnRUoVbY6xJbuklrA 密码:x5bi
官网下载链接:https://www.elastic.co/cn/downloads/past-releases#elasticsearch
-
ElasticSearch安装
1 解压: tar -zxvf elasticsearch-5.2.0.tar.gz
2 启动:sh bin/elasticsearch
3 查看是否启动成功:http://localhost:9200/?pretty
返回如下json:
{ "name": "pVi8N2h",(节点名) "cluster_name": "elasticsearch",(集群名,可在elasticsearch.yml中cluster.name配置) "cluster_uuid": "KZQ6hSl6RBWben14Wg0d_g", "version": { "number": "5.2.0",(版本号) "build_hash": "24e05b9", "build_date": "2017-01-24T19:52:35.800Z", "build_snapshot": false, "lucene_version": "6.4.0" }, "tagline": "You Know, for Search" }
-
Kibana安装
1 解压: tar -zxvf kibana-5.2.0-darwin-x86_64.tar.gz
2 启动:sh kibana-5.2.0-darwin-x86_64/bin/kibana
3 查看是否启动成功:
- 打开http://localhost:5601
- 进入Dev Tools中输入命令:GET _cluster/health并运行,可获取如下json:
{ "cluster_name": "elasticsearch", "status": "yellow", "timed_out": false, "number_of_nodes": 1, "number_of_data_nodes": 1, "active_primary_shards": 1, "active_shards": 1, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 1, "delayed_unassigned_shards": 0, "number_of_pending_tasks": 0, "number_of_in_flight_fetch": 0, "task_max_waiting_in_queue_millis": 0, "active_shards_percent_as_number": 50 }