ELK 8.x 安裝方式
ELK 8.x 安裝方式
ELK 8.x 安裝方式
X 安裝⽅式
1. 安裝java的Open JDK 11版本
yum install java-11-openjdk.x86_64 -y
java --version
2. 下載Elasticsearch,官⽅網址:link
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.x.x-x86_64.rpm
3. 安裝Elasticsearch
yum install elasticsearch-8.4.3-x86_64.rpm -y
安裝成功會出現底下畫⾯,在先記下避免後續操作會使⽤到
預設密碼 => The generated password for the elastic built-in superuser is : el*bB9S8MrQxoBBHwPrm
變更密碼
Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
建⽴kibana token
Generate an enrollment token for Kibana instances with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
5. 調整啟動JVM⽤量
vim jvm.options
如記憶體有超過 以上,再做調整
8G
將 都改為
-Xms4g, -Xmx4g
-Xms7G
-Xmx7G
6. 啟動Elasticsearch
systemctl start elasticsearch
7. 確認Elasticsearch啟動狀況
systemctl status elasticsearch.service
8. 檢查Elasticsearch狀態
9. 建⽴kibana token
/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token --scope kibana
kibana token:
eyJ2ZXIiOiI4LjQuMyIsImFkciI6WyIxOTIuMTY4LjEwMS45Nzo5MjAwIl0sImZnciI6IjJiNTJhOWNjZGYwMzU0NTYxMmVkNjk2Y2M2ZGQyYTI3NDVlNmU3YmI3ODcyY2Y5ZTEwOGE0