日本高清免费一本视频100禁_在线不卡欧美精品一区二区三区_国产一区二区好的精华液_中文综合在线_国产啊啊啊视频在线观看_大地资源网免费观看高清

IT之道-艾銻知道

您當前位置: 主頁 > 資訊動態 > 艾銻分享 >

服務器維護CentOS 7下ELK5.4.1配置部署


2020-06-07 13:51 作者:admin

服務器維護CentOS 7下ELK5.4.1配置部署

 
如何做好服務器維護?北京艾銻無限科技與你談談IT人員必須知道的服務器維護信息

 

服務器維護小知識一、概念

服務器維護小知識1、核心組成
ELK由Elasticsearch、Logstash和Kibana三部分組件組成;Elasticsearch是個開源分布式搜索引擎,它的特點有:分布式,零配置,自動發現,索引自動分片,索引副本機制,restful風格接口,多數據源,自動搜索負載等。
Logstash是一個完全開源的工具,它可以對你的日志進行收集、分析,并將其存儲供以后使用
kibana 是一個開源和免費的工具,它可以為 Logstash 和 ElasticSearch 提供的日志分析友好的 Web 界面,可以幫助您匯總、分析和搜索重要數據日志
服務器維護小知識2.下載 
官網下載地址:https://www.elastic.co/downloads
 
從中獲取最新版軟件包軟件包列表:
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.1.tar.gz
https://artifacts.elastic.co/downloads/kibana/kibana-5.4.1-linux-x86_64.tar.gz
https://artifacts.elastic.co/downloads/logstash/logstash-5.4.1.tar.gz
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.4.1-linux-x86_64.tar.gz
服務器維護小知識3.注意事項
  a、所有節點操作系統版本最好保持一致,CentOS6.5測試最新版本內核不支持,盡可能使用目前centos7.3穩定版本。Elk服務器配置需要,如果條件運行使用為2C4G,
  b、本文檔為單機版,即將Elasticsearch、Logstash和Kibana安裝在一臺服務器上,生產環境建議將其在docker中分開安裝,以便快速遷移至物理服務器。
  c、關閉selinux,關閉firewalld或添加端口例外.修改主機名稱。

服務器維護小知識二、安裝部署

服務器維護小知識1.安裝jdk
yum install -y java-1.8.0-openjdk
hostnamectl set-hostname elk-1            #修改主機名
systemctl stop firewalld                  #關閉firewalld
setenforce 0
服務器維護小知識2.下載軟件包
 
服務器維護小知識3.安裝elasticsearch
cd /usr/local/tools
tar zxf elasticsearch-5.4.1.tar.gz
mv elasticsearch-5.4.1 /usr/local/elasticsearch
cd /usr/local/elasticsearch/config/
編輯elasticsearch.yml
 
mkdir -p /usr/local/elasticsearch/data /usr/local/elasticsearch/logs
useradd elasticsearch
chown -R elasticsearch:elasticsearch /usr/local/elasticsearch
echo "vm.max_map_count = 655360" >>/etc/sysctl.conf && sysctl -p
 
elasticsearch不可用root用戶啟動,新建elasticsearch運行用戶
編輯/etc/security/limits.conf文件,新增以下內容
* soft nofile 65536 
* hard nofile 65536 
* soft nproc 65536 
* hard nproc 65536
啟動elasticsearch
su - elasticsearch 
cd /usr/local/elasticsearch 
bin/elasticsearch &
 
 
查看端口監聽信息
 
curl測試
 
4.安裝logstash
cd /usr/local/tools
tar -zxvf logstash-5.4.1.tar.gz
mv logstash-5.4.1 /usr/local/logstash
cd /usr/local/logstash/config
vim 01-syslog.conf
 
服務器維護小知識安裝filebeat
cd /usr/local/tools/
tar -zxvf filebeat-5.4.1-linux-x86_64.tar.gz
mv filebeat-5.4.1-linux-x86_64 /usr/local/filebeat
vim /usr/local/filebeat/filebeat.yml
 
 
啟動filebeat
/usr/local/filebeat
./filebeat &
 
服務器維護小知識啟動logstash(加載配置文件啟動)
cd /usr/local/logstash/
bin/logstash -f config/01-syslog.conf &
 
查看監聽端口
 
 
稍等以后屏幕會輸出返回的結果
 
 
可以用名稱測試:curl http://172.17.10.198:9200/_search?pretty
 
 
我們想以web形式展現數據,就需要安裝kibana
服務器維護小知識5.安裝kibana
cd /usr/local/tools/
tar -zxf kibana-5.4.1-linux-x86_64.tar.gz
mv kibana-5.4.1-linux-x86_64 /usr/local/kibana
cd /usr/local/kibana/config
vim /usr/local/kibana/config/kibana.yml
 
啟動
/bin/kibana &
 
 
 
查看端口監聽情況
 
 

服務器維護小知識三、測試

通過web界面訪問,創建index patterns
 
服務器維護小知識查看創建對應的日志
 
IT運維  我們選擇北京艾銻無限 
以上文章由北京艾銻無限科技發展有限公司整理
 



相關文章

IT外包服務
二維碼 關閉
主站蜘蛛池模板: 枣阳市| 宁都县| 澄江县| 常熟市| 汝城县| 永兴县| 昭觉县| 曲松县| 赣州市| 辽阳市| 巩留县| 七台河市| 阿拉尔市| 高雄市| 嵩明县| 延边| 信宜市| 宾阳县| 贞丰县| 砀山县| 高台县| 阳朔县| 高平市| 竹溪县| 房产| 牡丹江市| 册亨县| 巴南区| 山阳县| 永和县| 丰都县| 闽侯县| 南郑县| 京山县| 图们市| 北京市| 晋州市| 合作市| 茌平县| 陆丰市| 永新县|