我在Mac上尝试安装了ELK(Elasticsearch,Logstash,Kibana)
当时的环境
OS X 10.10.5
弹性搜索2.3.2
日志聚合工具2.3.2
可视化工具4.5
Elasticsearch弹性搜索
下载和安装Java(JDK)。
请访问以下链接:http://www.oracle.com/technetwork/java/javase/downloads/index.html,自行下载安装
$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
先确认版本号是否为1.7以上。
安装
$ brew install elasticsearch
为了插件设定通行路径
export ELASTICPATH=/usr/local/Cellar/elasticsearch/2.2.0_1/libexec/bin
安装插件
$ plugin install mobz/elasticsearch-head
$ plugin install analysis-kuromoji
$ vim /usr/local/etc/elasticsearch/elasticsearch.yml
以下完整追加
################################## Custom ################################
# Using kuromoji in default
index.analysis.analyzer.default.type: custom
index.analysis.analyzer.default.tokenizer: kuromoji_tokenizer
启动
$ ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
记录管道
$ brew install logstash
$ /usr/local/Cellar/logstash/2.3.2/
Kibana: 基本
$ mkdir ~/kibana && cd $_
$ wget https://download.elastic.co/kibana/kibana/kibana-4.5.0-darwin-x64.tar.gz
$ tar zxvf kibana-4.5.0-darwin-x64.tar.gz
$ mv kibana-4.5.0-darwin-x64 kibana
参考的网址如下:
http://morizyun.github.io/blog/elasticsearch-kibana-setup-mac/
http://qiita.com/y-temp4/items/ffafe1c0ea8a29ce8707