標籤:json ash 指令碼 命令 ted tar last 下載中心 分布式
Elasticsearch(簡稱ES)是一個基於Lucene的分布式全文檢索搜尋伺服器,本隨筆示範在Windows安裝Elasticsearch和用於管理ES的Head外掛程式。
Elasticsearch官網:http://www.elasticsearch.org
一,安裝Java SE環境
從Java Se Download下載Java SE開發包,
二,安裝Elasticsearch
1,下載Elasticsearch 2.4.4版本
從官方下載中心 Elasticsearch Download 下載Elasticsearch安裝包,在樓主時,ES的最新版本是5.1.2,本文使用舊版本2.4.4,開啟 past releases 選擇過去的版本安裝,下載zip檔案格式。樓主選擇安裝2.4.4版本的原因是5.1.2 版本不支援Head外掛程式。
2,開啟Elasticsearch 服務
將zip檔案解壓到C盤,進入 C:\elasticsearch-2.4.4\bin 目錄,雙擊執行 elasticsearch.bat,該指令檔執行 Elasticsearch 安裝程式,稍等片刻,開啟瀏覽器,輸入 http://localhost:9200 ,顯式以下畫面,說明ES安裝成功。
三,安裝head外掛程式
1,在命令列中安裝外掛程式
按住Windows+R,輸入cmd,開啟命令列工具,進入到Elasticsearch的bin目錄,使用ES命令安裝外掛程式
cd C:\elasticsearch-2.4.4\binplugin -install mobz/elasticsearch-head
2,通過網頁管理Elasticsearch
在本地瀏覽器中輸入http://localhost:9200/_plugin/head/,如果看到以下,說明head外掛程式安裝成功。
四,推薦閱讀書籍
推薦書籍:《Elasticsearch伺服器開發(第2版)》,該書使用curl工具調用ES的API,實際上,使用Head外掛程式,在Any Request 選項卡中,能夠輕易地構造出向ES伺服器發送請求的API的URL,實現同樣的功能:
例如:使用curl工具向ES伺服器發送命令,擷取叢集的健康狀態:
curl -XGET http://127.0.0.1:9200/_cluster/health?pretty
使用Head外掛程式,向ES伺服器發送Request,擷取叢集的健康狀態::
參考文檔:
elasticsearch叢集管理工具head外掛程式
Elasticsearch 簡單入門
Elasticsearch教程(一),全程直播(小白層級)
Elasticsearch教程(一)——簡介與安裝
分布式搜尋elasticsearch叢集管理工具head
ES1:Windows下安裝Elasticsearch