ELK_01_安装部署ES_Kibana_Filebeat

Elasticsearch:数据库,存储数据 需要JAVA环境

Logstash:收集日志,过滤数据        需要JAVA环境
Kibana:分析,过滤,展示            需要JAVA环境
Filebeat:收集日志,传输到ES        需要GO环境 ##轻量级

环境规划:
189.118 主机名elk01 安装 es、kibana、nginx、filebeat 内存3G
安装部署:
++++++++++++ 189.118
es下载地址:
wget http://www.xchinagroup.top/softdown/centos7/13_elk/elasticsearch-6.6.0.rpm

es 安装完后,安装ntpdate
ES安装步骤,参照前面文档。
yum install ntpdate -y ##时间同步

ntpdate time1.aliyun.com
++++++ 189.118
安装kibana
与es 安装在一起(189.118)

kibana下载地址:
wget http://www.xchinagroup.top/softdown/centos7/13_elk/kibana-6.6.0-x86_64.rpm

rpm -ivh kibana-6.6.0-x86_64.rpm
rpm -qc kibana 查看kibana的配置文件地址
修改配置文件
vim /etc/kibana/kibana.yml










保存,退出。
systemctl enable kibana.service
systemctl start kibana.service




稍等一下,因为Kibana启动比较慢。









+++++ 192.168.189.118

安装nginx httpd-tools
yum install epel-release -ys
yum install nginx httpd-tools -y
systemctl enable nginx.service
systemctl start nginx.service



压力测试:
ab -n 100 -c 100 http://192.168.189.118/
tail -f /var/log/nginx/access.log


有日志就可以了。
++++++++ 192.168.189.118
安装 filebeat
下载地址:
wget http://www.xchinagroup.top/softdown/centos7/13_elk/kibana-6.6.0-x86_64.rpm
rpm -ivh filebeat-6.6.0-x86_64.rpm

配置文件:/etc/filebeat/filebeat.yml
cp /etc/filebeat/filebeat.yml /root/filebeat.yml.bak
vim /etc/filebeat/filebeat.yml








其他可以先不用改,保存退出。


精简filebeat.yml


再次精简配置文件


重启filebeat
systemctl restart filebeat
tail -f /var/log/filebeat/filebeat