一、Elasticsearch 下载安装
- Elasticsearch下载地址:http://www.elastic.co/downloads/elasticsearch
- 解压后打开bin文件夹中的elasticsearch (前提是电脑中的Java-jdk版本位1.8)
- 访问:http://127.0.0.1:9200 ;出现如下画面为启动成功(用户名是随机的)
4. Elasticsearch简介
二、Elasticsearch-head插件安装
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
node -v #检查node环境
npm install
(如果elasticsearch-head/node_modules目录中没有grunt文件,可以执行以下操作)
cd elasticsearch-head
npm install grunt --save
-
访问:http://localhost:9100/ (集群值:未连接)
-
打开 ./config/elasticsearch.yml 输入:
http.cors.enabled: true
http.cors.allow-origin: “*” -
重新启动elasticsearch: ./bin/elasticsearch
-
重新启动head插件:
cd elasticsearch-head
npm run start
(出现如下画面为连接成功)
三、Kibana下载安装
- 下载页面:https://www.elastic.co/downloads/kibana/
- 安装;打开 config/kibana.yml 输入:
#配置es集群url
elasticsearch.url: “http://127.0.0.1:9200” - 打开 bin/kibana 启动kibana
- 访问:http://localhost:5601/ (如下运行成功)
四、metricbeat下载安装
- 下载页面:https://www.elastic.co/downloads/beats/metricbeat ; 或者通过指令:
curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.0.0-darwin-x86_64.tar.gz
tar xzvf metricbeat-7.0.0-darwin-x86_64.tar.gz #mac版
curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.0.0-linux-x86_64.tar.gz #linux版
- 修改metricbeat.yml文件中的Dashboards、Kibana、Elasticsearch output,如图
- 按装metribeat到Kibana上:
./metricbeat -e -c metricbeat.yml -d "publish"