1、下載Elasticsearch、kibana、logstash
本文不介紹ELK相關(guān)原理知識(shí),只記錄部署操作過程
下載地址Past Releases of Elastic Stack Software | Elastic
選擇同一版本,這里選擇是當(dāng)前最新版本8.11.3
解壓放在同目錄下,方便后續(xù)操作與使用
2、安裝與啟動(dòng)Elasticsearch
由于8.11.3使用自帶jdk,這里可以不用安裝jdk并配置,低版本需要電腦中安裝jdk
設(shè)置一下配置文件
修改文件?F:\elasticsearch-8.11.3\config\elasticsearch.yml
。
elasticesearch.bat是用于第一次安裝運(yùn)行和之后啟動(dòng)es的
出現(xiàn)starting即啟動(dòng)成功
打開瀏覽器訪問http://localhost:9200/
3、啟用head插件(web插件)
在github上下載elasticsearch-head-master
修改文件F:\elasticsearch-8.11.3\config\elasticsearch.yml,添加下面內(nèi)容
http.cors.enabled: true
http.cors.allow-origin: "*"
定位到elasticsearch-head-master根目錄,以此執(zhí)行下面命令。
npm install -g grunt-cli
npm install
grunt server
啟動(dòng)成功,訪問?http://localhost:9200/
4、使用kibana
配置文件修改
F:\kibana-8.11.3\config\kibana.yml
雙擊啟動(dòng)kibana.bat,啟動(dòng)比較慢耐心等待一下
啟動(dòng)成功后訪問 http://localhost:5601
5、使用logstash
解壓logstash,配置logstash.conf文件
這里配置的是jdbc連接,將test數(shù)據(jù)庫中的表website導(dǎo)入的es中,僅作配置參考
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/test"
jdbc_user => "root"
jdbc_password => "root"
jdbc_validate_connection => true
jdbc_driver_library => ""
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
statement => "SELECT * FROM website"
}
}
filter {
mutate {
rename => {
"longitude" => "[location][lon]"
"latitude" => "[location][lat]"
}
}
}
output {
stdout {
}
elasticsearch {
index => "website"
hosts => "localhost:9200"
document_type => "_doc"
}
}
運(yùn)行腳本文章來源:http://www.zghlxwxcb.cn/news/detail-797033.html
logstash -f logstash.conf
先記錄到這里,后續(xù)更新文章來源地址http://www.zghlxwxcb.cn/news/detail-797033.html
到了這里,關(guān)于Elasticsearch Windows部署-ELK技術(shù)棧的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!