您好,登錄后才能下訂單哦!
如何用centos7.7搭建EFK7,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。
環境:
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. 配置EFK的yum環境
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
創建一個yum源文件
vim efk.repo:
[elasticsearch] name=Elasticsearch 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=0 autorefresh=1 type=rpm-md [elastic-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 [kibana-7.x] name=Kibana 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
2. 安裝EFK
yum install --enablerepo=elasticsearch elasticsearch yum install kibana yum install filebeat
3. 配置EFK
a. 配置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. 配置kibana
vim /etc/kibana/kibana.yml
server.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: [" #ip改成部署了elasticsearch服務的機器ip kibana.index: ".kibana"
c. 配置filebeat
vim /etc/filebeat/filebeat.yml
setup.kibana: host: " # ip改成部署了kibana服務的機器ip output.elasticsearch: hosts: ["localhost:9200"] # ip改成部署了elasticsearch服務的機器ip, 我這里是一臺機器,所以localhost等于11.22 filebeat.inputs: - type: log enabled: false paths: # 日志收集的路徑 - /var/log/*.log
啟動EFK服務
systemctl start elasticsearch.service
如果有關elasticsearch的啟動問題,點擊: https://blog.51cto.com/liuxiaolan/2463905
systemctl start kibana.service
systemctl start filebeat.service
看完上述內容,你們掌握如何用centos7.7搭建EFK7的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。