elk7.9.2使用rpm安装
环境:linux
1、软件下载elk
1 2 3 4 | 下载链接https: //elasticsearch.cn/download/ wget https: //artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.2-x86_64.rpm wget https: //artifacts.elastic.co/downloads/kibana/kibana-7.9.2-x86_64.rpm wget https: //artifacts.elastic.co/downloads/logstash/logstash-7.9.2.rpm |
2、7.9需要安装jdk11,下载链接
链接: https://pan.baidu.com/s/1EYtj3d8OboJDjypoTLdLog 提取码: y2jn
3、安装jdk和elk
1 2 3 4 | rpm -ivh jdk-11.0.9_linux-x64_bin.rpm rpm -ivh elasticsearch-7.9.2-x86_64.rpm rpm -ivh kibana-7.9.2-x86_64.rpm rpm -ivh logstash-7.9.2.rpm |
4、配置elasticsearch
1 2 3 4 5 6 7 8 9 10 11 12 13 | cat /etc/elasticsearch/elasticsearch.yml #集群名 cluster.name: my-es #node名 node.name: node-1 #数据目录 path.data: /data/es-data #日志目录 path.logs: / var /log/elasticsearch network.host: 0.0.0.0 http.port: 9200 #集群master需要和node名设置一致 cluster.initial_master_nodes: [ "node-1" ] |
5、启动elasticsearch并验证
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | mkdir -p /data/es-data chown -R elasticsearch:elasticsearch /data/es-data/ systemctl start elasticsearch systemctl enable elasticsearch [root@node-1]# curl 127.0.0.1:9200 { "name" : "node-1" , "cluster_name" : "my-es" , "cluster_uuid" : "-5vm0JOyQP-fehWjlXal_A" , "version" : { "number" : "7.1.1" , "build_flavor" : "default" , "build_type" : "rpm" , "build_hash" : "7a013de" , "build_date" : "2019-05-23T14:04:00.380842Z" , "build_snapshot" : false , "lucene_version" : "8.0.0" , "minimum_wire_compatibility_version" : "6.8.0" , "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" } |
6、修改kibana配置
1 2 3 4 5 6 | cat /etc/kibana/kibana.yml server.port: 5601 server.host: "yourip" server.name: "node-1" elasticsearch.hosts: [ "http://192.168.1.4:9200" ] kibana.index: ".kibana" |
7、启动kibana并验证
1 2 3 | systemctl start kibana systemctl enable kibana 网页访问链接:http: //ip:5601 |
8、使用logstash收集日志
标准输入输出
1 | /usr/share/logstash/bin/logstash -e 'input { stdin{} } output { stdout {} }' |
9、配置Kibana中文显示
修改配置文件 vi /etc/kibana/kibana.yml
#il8n.locale: "en"
改为
il8n.locale: "zh-CN"
做一个决定,并不难,难的是付诸行动,并且坚持到底。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)