ELK+KAFKA+XPACK+filebeat安装使用教程(史上最全)(上)
一、架构图:
二、主机信息
三、基础环境配置
关闭防火墙、selinux,安装jdk,命令:yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel,
从网址https://elasticsearch.cn/download/,下载所需的安装包,kibana、elasticsearch、logstash、filebeat、metricbeat等。
在各主机的/etc/hosts增加域名解析配置
192.168.100.120 es1
192.168.100.121 node1
192.168.100.122 node3
192.168.100.113 node2
四、安装并配置Elasticsearch
安装elasticsearch集群服务需要奇数个,本案例采用三台服务器,安装elasticsearch(7.6.0)集群,本案例下载的tar包,解压后安装最终配置如下,本案例已破解xpack,若未破解,xpack部分可不配置,破解版除了增加认证外还有一些好用的功能如beats集中管理等,推荐破解,破解方法参考https://blog.espnlol.com/?p=504
和https://blog.csdn.net/a112626290/article/details/103367867
。
192.168.100.121配置
cluster.name: myelk #集群名称
node.name: node1 #节点名称
node.master: true
node.data: true
network.host: 192.168.100.121
http.port: 9200
discovery.seed_hosts: ["node1", "node2","node3"]
cluster.initial_master_nodes: ["node1", "node2","node3"]
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.monitoring.enabled: true
xpack.graph.enabled: false
xpack.watcher.enabled: false
xpack.ml.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization,X-Requested-With,Content-Length,Content-Type"
192.168.100.113配置
cluster.name: myelk
node.name: node2
node.master: true
node.data: true
network.host: 192.168.100.113
http.port: 9200
discovery.seed_hosts: ["node1", "node2","node3"]
cluster.initial_master_nodes: ["node1", "node2","node3"]
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.monitoring.enabled: true
xpack.graph.enabled: false
xpack.watcher.enabled: false
xpack.ml.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization,X-Requested-With,Content-Length,Content-