Elasticsearch5.4.0(head/kibana/logstash)安裝部署深入詳解

Elasticsearch5.4.0(head/kibana/logstash)安裝部署深入詳解



1、ES5.4.0安裝包下載地址

https://www.elastic.co/downloads/past-releases/elasticsearch-5-4-0

2、Centos6.7 Elasticsearch5.4.0安裝

步驟1:解壓
-rw-r–r–. 1 root root 33302352 Jun 8 01:28 elasticsearch-5.4.0.tar.gz
tar -zxvf elasticsearch-5.4.0.tar.gz
步驟2:
拷貝到:/opt/路徑下,改名: elasticsearch-5.4.0爲 elasticsearch。
步驟3:Linux下新建賬戶:elasticsearch
步驟4:修改/opt/elasticsearch的賬戶權限。
chown -R elasticsearch:elasticsearch /opt/elasticsearch
步驟5:修改配置文件/opt/elasticsearch/config/elasticsearch.yml
步驟6:切換到elasticsearch賬戶
步驟7:啓動elasticsearch
步驟8:驗證啓動是否成功:
這裏寫圖片描述

3、Head插件安裝

步驟1:Git clonegit://github.com/mobz/elasticsearch-head.git
步驟2:切換到elasticsearch-head路徑(我的解壓路徑:
/home/es01/elasticsearch/plugins/elasticsearch-head)
cd elasticsearch-head
npm install //一定要在elasticsearch-head目錄下執行該命令
步驟3:修改配置
修改elasticsearch-head下Gruntfile.js文件,默認監聽在127.0.0.1下9200端口
這裏寫圖片描述
步驟4:啓動服務
1)cd elasticsearch-head/node_modules/grunt/bin/
./grunt server
2)進入elasticsearch-head目錄後,配置完Gruntfile.js 直接 npm run start 即可

步驟5:驗證安裝成功。
瀏覽器訪問 http://localhost:9100/ (localhost換成插件所在的機器的ip)
成功標誌如下圖所示:
這裏寫圖片描述
1.x,2.x版本的訪問:http://IP:9200/_plugin/head
5.x版本訪問:http://IP:9100/

4、Kibana安裝

kibana下載地址:https://www.elastic.co/downloads/past-releases/kibana-5-4-1
步驟1:解壓
步驟2:切換路徑
tar -xzf kibana-5.4.1-darwin-x86_64.tar.gz
cd kibana/

步驟3:修改配置
這裏寫圖片描述
步驟4:運行kibana
./bin/kibana

5、logstash安裝

logstash下載地址:
步驟1:安裝公有簽名key。

rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch

步驟2:在/etc/yum.repos.d/下新增logstash.repo,添加如下內容:

[logstash-5.x]
name=Elastic repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

步驟3:安裝logstash

sudo yum install logstash

步驟4:執行logstash(舉例)
bin/logstash -f logstash-simple.conf

6、遇到的坑及解決方案

1)ES安裝坑:http://www.jianshu.com/p/89f8099a6d09
2)head安裝坑: http://www.echojb.com/network/2017/05/13/384500.html
3)kibana安裝坑: https://www.elastic.co/guide/en/kibana/current/targz.html
4)logstash安裝坑:
https://www.elastic.co/guide/en/logstash/current/configuration.html
5)ES跨域支持:http://www.echojb.com/network/2017/05/13/384500.html

作者:銘毅天下
轉載請標明出處,原文地址:
http://blog.csdn.net/laoyang360/article/details/73368740

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章