2019-10-29

使用 Elasticsearch + Kibana + Logstash 搭建简单日志分析平台

ELK 架构图

ELK 流程图

安装 Elasticsearch

导入公钥

1
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

安装 Elasticsearch

1
2
3
4
5
6
7
sudo apt-get install apt-transport-https

echo "deb http://mirrors.tencentyun.com/elasticstack/apt/7.x/ stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

sudo apt-get update

sudo apt-get install elasticsearch

配置 Elasticsearch 开机启动

1
2
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

操作 Elasticsearch 常用命令

1
2
3
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
sudo systemctl restart elasticsearch.service

安装 Kibana

1
sudo apt-get install kibana

安装 Logstash

1
2


安装 Redis