1.安装java
yum install java -y
2.下载、安装ES和kibana
https://www.elastic.co/cn/downloads/past-releases#elasticsearch
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.17.3-x86_64.rpm
rpm -ivh elasticsearch-7.17.3-x86_64.rpm kibana-7.17.3-x86_64.rpm
3.修改jvm内存
[root@localhost elasticsearch]# vim /etc/elasticsearch/jvm.options## -Xms4g## -Xmx4g
4.启动
5.安装filebeat—用于采集Linux日志,所有Linux服务器的系统需要安装;
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.17.3-x86_64.rpm[root@localhost ~]# rpm -ivh filebeat-7.17.3-x86_64.rpm
6.安装syslog,整合Linux服务器的日志
[root@localhost filebeat]# yum install rsyslog -y[root@localhost filebeat]# vim /etc/rsyslog.conf*.* /var/log/server.log[root@localhost filebeat]# systemctl start rsyslog[root@localhost filebeat]# systemctl enable rsyslog
7.配置filebeat
[root@localhost filebeat]# cat filebeat.ymlfilebeaet.inputs:- type: logenabled: truepaths:- /var/log/server.logoutput.elasticsearch:hosts: ["10.10.100.221:9200"]
