2024年9月23日 星期一

ELK on Windows

Download Elasticsearch, unzip to C:\elasticsearch-8.15.1

Download Kibana, unzip to C:\kibana-8.15.1

Download Winlogbeat, unzip to C:\winlogbeat-8.15.1
 
Download nssm, unzip to C:\nssm-2.24
 
開啟 命令提示字元
cd C:\elasticsearch-8.15.1\bin
執行 elasticsearch.bat 開始安裝
安裝後必須把下圖的資料保留到 notepad,並在 30 分鐘內用 Kibana 連上
開啟 命令提示字元
cd C:\kibana-8.15.1\bin
執行 kibana.bat 開始安裝
安裝完成後用 browser 開啟指定的連結
 
在 browser 貼上 Elasticsearch 安裝後提供的 token
 
輸入帳號 elastic,密碼在安裝完成後的資訊裡面
 

 登入後修改密碼

 
 
執行 C:\elasticsearch-8.15.1\bin\elasticsearch-certgen.bat 產生憑證給 kibana 使用
(不需要回答,都 Enter 即可)
將 C:\elasticsearch-8.15.1\certificate-bundle.zip 解壓縮到 C:\kibana-8.15.1\ca

修改 C:\kibana-8.15.1\config\kibana.yml
server.host: "your_IP_address"
server.ssl.enabled: true
server.ssl.certificate: C:\kibana-8.15.1\ca\ca.crt
server.ssl.key: C:\kibana-8.15.1\ca\ca.key
 
存檔後,重新執行 kibana.bat
用 browser 開啟 https://your_IP_address:5601
 
將elasticsearch 改為 service 啟動
C:\elasticsearch-8.15.1\bin\elasticsearch-service.bat install

將 kibana 改為 service 啟動

修改 C:\winlogbeat-8.15.1\winlogbeat.yml
hosts: ["your_IP_address:9200"]
protocol: "https"
username: "elastic"
password: "your_password"
ssl.ca_trusted_fingerprint: "33fe0289e97952cf2efe3ae6028616aa258bebf28dceeb3d4830fd4ee401bdc8"
(在 elasticsearch 安裝完成後的資訊裡面)

開啟 powershell
cd C:\winlogbeat-8.15.1
執行 .\install-service-winlogbeat.ps1
到服務裡面啟動 winlogbeat
 
登入 https://your_IP_address:5601 查看



沒有留言:

張貼留言