天天看點

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

步驟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:驗證啟動是否成功:

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

3、Head插件安裝

步驟1:git clone git://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端口

————————————————

版權聲明:本文為CSDN部落客「銘毅天下」的原創文章,遵循CC 4.0 BY-SA版權協定,轉載請附上原文出處連結及本聲明。

原文連結:

https://blog.csdn.net/laoyang360/article/details/73368740
Elasticsearch5.4.0(head/kibana/logstash)安裝部署深入詳解

步驟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)

成功标志如下圖所示:

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

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

步驟2:切換路徑

tar -xzf kibana-5.4.1-darwin-x86_64.tar.gz

cd kibana/

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

步驟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

步驟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

6)head插件npm安裝參考:

http://t.cn/RZPxF2B

繼續閱讀