Mac环境:OS X 10.15.5
安装ELK
elasticsearch、logstash、kibana在mac下的安装与启动
安装java8
网上教程都推荐以下命令,但是错误的❌
brew cask install homebrew/cask-versions/java8
报错:Cask ‘java8’ is unavailable: ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions/Casks/java8.rb’ does not exist.
mac用homebrew安装java8的时候报错,homebrew默认不支持java8了。
解决方案:
brew cask install homebrew/cask-versions/adoptopenjdk8
安装es(elasticsearch)
brew install elasticsearch
运行es
brew services start elasticsearch
查看安装信息执行
brew info elasticsearch
curl请求地址http://localhost:9200
或者浏览器请求地址看一下效果
curl http://localhost:9200
{
"name" : "wxiangqiandeMacBook-Pro.local",
"cluster_name" : "elasticsearch_brew",
"cluster_uuid" : "K1g6JY_6RYaqxNTa_niphA",
"version" : {
"number" : "7.8.1-SNAPSHOT",
"build_flavor" : "oss",
"build_type" : "tar",
"build_hash" : "unknown",
"build_date" : "2020-07-31T16:57:12.889003Z",
"build_snapshot" : true,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
安装logstash
brew install logstash
安装Kibana
Kibana是ES的一个配套工具,可以让用户在网页中与ES进行交互
brew install kibana
启动Kibana
brew services start kibana
本地浏览器访问
http://localhost:5601
简单的elk安装就到这里了!