ELK环境准备
配置:2核心2G内存
规划如下:
ip地址:
192.168.59.130:
jdk
kibana
elasticsearch
192.168.59.131:
jdk
logstash
1.关闭防火墙
systemctl stop firewalld
setenforce 0
2.时间同步
yum -y install ntpdate
ntpdate pool.ntp.org
ELK相关包链接:https://pan.baidu.com/s/112s9cetAG0PuCjENr0hT4Q
提取码:avsz
3.两台安装JDK
unzip ELK.zip
yum -y install jdk-8u131-linux-x64_.rpm
java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
4:安装elasticsearch
192.168.59.130 安装elasticsearch
yum -y install elasticsearch-6.6.2.rpm
vim /etc/elasticsearch/elasticsearch.yml

7.0以上版本修改以下版本

运行elasticsearch服务
systemctl enable elasticsearch
systemctl start elasticsearch
验证是否运行
tailf /var/log/elasticsearch/fncxy.log

显示info成功
5:安装logstash
192.168.59.131下安装logstash
yum -y install logstash-6.6.0.rpm
vim /etc/logstash/conf.d/msg.conf
input{
file{
path

本文详细介绍ELK( Elasticsearch、Logstash、Kibana)环境的搭建步骤,包括JDK安装、各组件配置、时间同步、防火墙关闭、nginx日志收集及邮件报警设置,适用于日志管理和实时数据分析。
最低0.47元/天 解锁文章
3034





