安装ELK
1. 安装Elasticsearch
a. 下载 :
https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.1.1/elasticsearch-2.1.1.tar.gz 到 /opt/
b. 解压:
cd /opt/
tar xzf elasticsearch-2.1.1.tar.gz
c. 启动:
/opt/elasticsearch-2.1.1/bin/elasticsearch -d #-d表示后台执行, 启动此elasticsearch需要非root用户。 这里使用aa用户,可能会出现权限错误, 解决办法: chown -R aa /opt/elasticsearch-2.1.1
注意事项:
- Don’t run Elasticsearch open to the public.
- Don’t run Elasticsearch as root.
- Disable dynamic scripting (disabled by default since 1.2.X).
2. 安装 Logstash
YUM
Download and install the public signing key:
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
Add the following in your /etc/yum.repos.d/
directory in a file with a .repo
suffix, for examplelogstash.repo
[logstash-2.1]
name=Logstash repository for 2.1.x packages
baseurl=http://packages.elastic.co/logstash/2.1/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1
And your repository is ready for use. You can install it with:
yum install logstash
//详细安装ELK
https://www.elastic.co/guide/en/beats/libbeat/current/getting-started.html
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决