Centos7 安装ELK日志分析

1.安装前准备

借鉴:https://www.cnblogs.com/straycats/p/8053937.html

操作系统:Centos7 虚拟机  8G内存  jdk8+

软件包下载:采用rpm方式部署 https://www.elastic.co/cn/downloads

 

2.安装ElasicSearch

rpm -ivh elasticsearch-6.4.2.rpm
rpm -ql elasticsearch # default /usr/share/elasticsearch
#默认日志目录 /var/log/elasticsearch
/etc/elasticsearch/elasticsearch.yml 配置文件
path.data #数据目录
path.logs #日志目录
network.host #监听地址
http.port #监听端口

#启动服务
systemctl start elasticsearch
systemctl enable elasticsearch

#检查
netstat -anlpt | grep 9200
curl http://127.0.0.1:9200

看到以下内容证明启动成功

 

3.安装logstash

rpm -ivh  logstash-6.4.2.rpm
/etc/logstash/logstash.yaml 配置文件
path.data
path.config
path.logs
#启动(会比较慢)
systemctl start logstash
systemctl enable logstash
ln -s /usr/share/logstash/bin/logstash /bin/

以下证明启动成功

 

4.安装Kibana

rpm -ivh kibana-6.4.2-x86_64.rpm  
/etc/kibana/kibana.yml 配置文件
server.port
server.host
elasticsearch.url
kibana.index

#启动
systemctl start kibana
systemctl enable kibana
netstat -anlpt | grep 5601

http://192.168.0.15:5601

 

posted @ 2018-11-04 22:25  Zeyangli  阅读(511)  评论(0编辑  收藏  举报