# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.2-x86_64.rpm # rpm --install elasticsearch-7.16.2-x86_64.rpm启动
[es@iZ8vb2buw6h1d518w0w17hZ ~]$ sudo systemctl daemon-reload [es@iZ8vb2buw6h1d518w0w17hZ ~]$ sudo systemctl enable elasticsearch.service [es@iZ8vb2buw6h1d518w0w17hZ ~]$ sudo systemctl start elasticsearch.serviceKibana安装
[es@iZ8vb2buw6h1d518w0w17hZ ~]$ wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.2-x86_64.rpm [es@iZ8vb2buw6h1d518w0w17hZ ~]$ sudo rpm --install kibana-7.16.2-x86_64.rpm
修改/etc/kibana/kibana.yml中如下配置,这几项配置放开:
server.port: 5601 server.host: "localhost" elasticsearch.hosts: ["http://localhost:9200"]启动Kibana
[root@iZ8vb2buw6h1d518w0w17hZ kibana]# systemctl enable kibana Synchronizing state of kibana.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable kibana Created symlink /etc/systemd/system/multi-user.target.wants/kibana.service → /etc/systemd/system/kibana.service. [root@iZ8vb2buw6h1d518w0w17hZ kibana]# systemctl start kibana安装logstash
logstash下载地址:https://www.elastic.co/cn/downloads/logstash
# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
在/etc/yum.repos.d/下添加一个yum源logstash.repo,并将如下内容添加进去:
[logstash-7.x] name=Elastic repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
执行安装操作:
# yum install logstash启动logstash
[root@iZ8vb2buw6h1d518w0w17hZ yum.repos.d]# systemctl enable logstash Created symlink /etc/systemd/system/multi-user.target.wants/logstash.service → /etc/systemd/system/logstash.service. [root@iZ8vb2buw6h1d518w0w17hZ yum.repos.d]# systemctl start logstash [root@iZ8vb2buw6h1d518w0w17hZ yum.repos.d]#配置输入日志
/etc/logstash目录,配置logstash.conf
elasticsearch安装可视化插件# yum install nodejs
下载head工程代码:
# cd /usr/share/elasticsearch/plugins # git clone https://github.com/mobz/elasticsearch-head.git
当然前提是安装了git,git的安装比较简单,yum install git一下就安装了。
进入elasticsearch-head,修改Gruntfile.js中的如下部分:
安装elasticsearch-head的依赖:
# npm install安装filebeat
github地址:https://github.com/elastic/beats/releases
https://www.elastic.co/guide/en/beats/filebeat/7.16/setup-repositories.html#_yum
# filebeat setup
创建索引
http://39.103.227.2:15601/app/management/kibana/indexPatterns/create
http://39.103.227.2:5601/app/management/kibana/indexPatterns/
(目前是还有些问题,未完待续)
单机部署ELK https://www.cnblogs.com/sparkdev/p/10554076.html
github filebeat https://github.com/elastic/beats/tree/master/filebeat



