Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build EFK7 with centos7.7

Shulou Source: shulou.com Published: 2022-06-01 08:41:48 10月03日 Update

How to use centos7.7 to build EFK7, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Environment:

System: CentOS Linux release 7.7.1908

Elasticsearch: elasticsearch-7.5.1-1.x86_64

Kibana: kibana-7.5.1-1.x86_64

Filebeat: filebeat-7.5.1-1.x86_64

1. Configure the yum environment for EFK

Rpm-- import https://packages.elastic.co/GPG-KEY-elasticsearch

Create a yum source file

Vim efk.repo:

[elasticsearch] name=Elasticsearch repository for 7.x packagesbaseurl= https://artifacts.elastic.co/packages/7.x/yumgpgcheck=1gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearchenabled=0autorefresh=1type=rpm-md[elastic-7.x]name=Elastic repository for 7.x packagesbaseurl= https://artifacts.elastic.co/packages/7.x/yumgpgcheck=1gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearchenabled=1autorefresh=1type=rpm-md[kibana-7.x]name=Kibana repository for 7.x packagesbaseurl= https://artifacts.elastic.co/packages/7.x/yumgpgcheck=1gpgkey=https:/ / artifacts.elastic.co/GPG-KEY-elasticsearchenabled=1autorefresh=1type=rpm-md

two。 Install EFK

Yum install-enablerepo=elasticsearch elasticsearch yum install kibana yum install filebeat

3. Configure EFK

a. Configure elasticsearch

Vim / etc/elasticsearch/elasticsearch.yml

Node.name: node-1 cluster.initial_master_nodes: ["node-1"] http.port: 9200 network.host: 0.0.0.0

b. Configure kibana

Vim / etc/kibana/kibana.yml

Server.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: ["# ip is changed to the machine on which the elasticsearch service is deployed ip kibana.index:" .kibana "

c. Configure filebeat

Vim / etc/filebeat/filebeat.yml

Setup.kibana: host: "# ip is changed to the machine where the kibana service is deployed ip output.elasticsearch: hosts: [" localhost:9200 "] # ip to the machine ip where the elasticsearch service is deployed. I have a machine here. So localhost equals 11.22 filebeat.inputs:-type: log enabled: false paths: # path to log collection-/ var/log/*.log

Start the EFK service

Systemctl start elasticsearch.service

If you have questions about the startup of elasticsearch, click: https://blog.51cto.com/liuxiaolan/2463905

Systemctl start kibana.service

Systemctl start filebeat.service

After reading the above, have you mastered how to build EFK7 with centos7.7? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Configuration machines services problems content methods more environment helpless for this reason skills logs source files articles experience industry information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Shulou Technology macOS vpn