1. 程式人生 > >02-windows下elasticsearch安裝elasticsearch-head

02-windows下elasticsearch安裝elasticsearch-head

1.簡介

elasticsearch-head是一個介面化的叢集操作和管理工具,可以對叢集進行傻瓜式操作。你可以通過外掛把它整合到es(首選方式),也可以安裝成一個獨立webapp。

es-head主要有三個方面的操作:

  1. 顯示叢集的拓撲,並且能夠執行索引和節點級別操作
  2. 搜尋介面能夠查詢叢集中原始json或表格格式的檢索資料
  3. 能夠快速訪問並顯示叢集的狀態
  4. 有一個輸入視窗,允許任意呼叫RESTful API。這個介面包含幾個選項,可以組合在一起以產生有趣的結果;
      1. 請求方法(get、put、post、delete),查詢json資料,節點和路徑
      2. 支援JSON驗證器
      3. 支援重複請求計時器
      4. 支援使用javascript表示式變換結果
      5. 收集結果的能力隨著時間的推移(使用定時器),或比較的結果
      6. 能力圖表轉換後的結果在一個簡單的條形圖(包括時間序列)

2.安裝

第一種安裝方式

  1. 我們只介紹外掛的安裝方式,另外的方式大家看官方文件即可。ES-head作為外掛,有兩個安裝方式:

通過elasticseach自帶的plugin命令
如下圖:

D:\elasticsearch\elasticsearch-6.2.0\bin>elasticsearch-plugin install elasticsearch-head
A tool for managing installed elasticsearch plugins

Commands
--------
list - Lists installed elasticsearch plugins
install - Install a
plugin remove - removes a plugin from Elasticsearch Non-option arguments: command Option Description ------ ----------- -h, --help show help -s, --silent show minimal output -v, --verbose show verbose output ERROR: Unknown plugin elasticsearch-head

以前使用命令

elasticsearch/bin/plugin -install
mobz/elasticsearch-head

但是6.X版本,改成elasticsearch-plugin了,具體看下圖

這裡寫圖片描述

但是沒有安裝成功。說沒有這個包(未解決)

第2種安裝方式

1. https://github.com/mobz/elasticsearch-head下載zip 解壓
2. 建立elasticsearch-2.3.1\plugins\head檔案
3. 將解壓後的elasticsearch-head-master資料夾下的檔案copy到head
4. 執行es
5. 開啟http://localhost:9200/_plugin/head/

安裝後執行es報錯如下

D:\elasticsearch\elasticsearch-6.2.0\bin>elasticsearch.bat
[2018-02-07T16:09:24,908][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: property [elasticsearch.version] is missing for plugin [head]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.0.jar:6.2.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.0.jar:6.2.0]
Caused by: java.lang.IllegalArgumentException: property [elasticsearch.version] is missing for plugin [head]
        at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:213) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Spawner.spawnNativePluginControllers(Spawner.java:75) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.0.jar:6.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.0.jar:6.2.0]
        ... 6 more

D:\elasticsearch\elasticsearch-6.2.0\bin>

第3種安裝方式

6.X中,elasticsearch-head

  1. 不能放在elasticsearch的 plugins、modules 目錄下
  2. 不能使用 elasticsearch-plugin install

直接啟動elasticsearch即可

安裝 elasticsearch-head
  1. 修改 elasticsearch/config/elasticsearch.yml
  2. 新增
http.cors.enabled: true
http.cors.allow-origin: "*"
  1. 下載 elasticsearch-head 或者 git clone 到隨便一個資料夾

這裡寫圖片描述

我是直接下載到D:\elasticsearch\elasticsearch-6.2.0\myplungins\elasticsearch-head-master目錄的
  1. cd D:\elasticsearch\elasticsearch-6.2.0\myplungins\elasticsearch-head-master

  2. npm install -g grunt-cli
    grunt是一個很方便的構建工具,可以進行打包壓縮、測試、執行等等的工作
D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master>npm install -g grunt-cli
C:\Users\Administrator\AppData\Roaming\npm\grunt -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
+ [email protected]
updated 1 package in 4.429s
  1. npm install
  D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master>npm install
npm WARN deprecated [email protected]: Use the built-in module in node 9.0.0 or newer, instead
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

> [email protected] install D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master\node_modules\phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at C:\Users\ADMINI~1\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\ADMINI~1\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1517991758740\phantomjs-2.1.1-windows -> D:\elasticsearch\elasticsearc
\elasticsearch-head-master\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 384 packages in 40.221s  

這一點第一次安裝會不一樣,會有進度條,我這是第二次,為了寫部落格

問題1:可能會報錯

Error making request.
Error: connect ETIMEDOUT 54.231.112.152:443
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

Please report this full log at https://github.com/Medium/phantomjs
npm WARN [email protected]0.0.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected]2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected]2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-03-02T02_46_07_354Z-debug.log

原因:網路原因
解決方法:多次執行,總會成功的

  1. grunt server
D:\elasticsearch\elasticsearch-6.2.0\myplugins\elasticsearch-head-master>grunt server
(node:3492) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100

這裡寫圖片描述

10.啟動我們的elasticsearch

這裡寫圖片描述

11.9100連結9200,並且測試,檢視叢集的健康狀況

這裡寫圖片描述

相關推薦

02-windowselasticsearch安裝elasticsearch-head

1.簡介 elasticsearch-head是一個介面化的叢集操作和管理工具,可以對叢集進行傻瓜式操作。你可以通過外掛把它整合到es(首選方式),也可以安裝成一個獨立webapp。 es-head主要有三個方面的操作: 顯示叢集的拓撲,並且能夠執行索引

ElasticSearch windows安裝

ElasticSearch介紹 ES是一個基於Lucene的分散式全文搜尋伺服器,和SQL Server的全文索引(Fulltext Index)有點類似,都是基於分詞和分段的全文搜尋引擎,具有分詞,同義詞,詞幹查詢的功能,但是ES天生具有分散式和實時的屬性。 例:多用於

elasticsearchwindows安裝

首先下載最新的elasticsearch安裝版本:elasticsearch下載。 下載最新的elasticsearch 0.90.1版本。下載完成後。解壓縮在安裝目錄。 在cmd命令列進入安裝目錄,再進入 bin目錄,執行elasticsearch.bat命令: 啟動成

Windows快速安裝Xgboost(無需Git或者VS)

nor port 最終 比賽 http 無需 windows git 到你 xgboost的全稱是eXtreme Gradient Boosting,現在已經風靡Kaggle、天池、DataCastle、Kesci等國內外數據競賽平臺,是比賽奪冠的必備大殺器!如果

windows 搭建安裝 sass

出版 版本號 ack sources 打印 strong 由於 ima install 眾所周知,sass 解析需要有 ruby 的支撐,所以, 第一步:點我下載 ruby; 第二步:安裝 ruby; 在安裝 ruby 過程中需要註意的一點:把 ruby 執行文件添加到 p

ActiveMQ在Windows安裝與啟動(懶人專屬)

最新 lin 管理 star 新的 tro 安裝目錄 min 1.5 其實這些ActiveMQ官網都有,但是如果你懶得看官網,那就直接看這吧! 1. 官網下載最新的ActiveMQ安裝包 apache-activemq-x.x.x-bin.zip並解壓 2.進入安

Mongodb的windows安裝

apt 4.6 提示 方式 path ssi sna mon 使用 正常途徑訪問Mongodb的官方網站,它只提供了msi 安裝包的下載,這種方式帶來的好處是直接作為windows的服務進行管理。 但是在有些情況下,我們希望不作為windows的服務進行安裝,比如受到公司I

Windows webstorm安裝tomcat配置svn並使用

.bat 文件夾 replace 一個 鏈接 vcs java jdk1 clas 1、下載並安裝jdk以及配置jdk的環境變量 1)下載jdk,選擇安裝目錄安裝,我選擇的是默認路徑,安裝兩次,第一次是安裝jdk,第二次是安裝jre,建議兩個都安裝在同一個java文件夾中的

redis 在Windows安裝及基本操作(更新中~~~)

有用 redis 安裝 abc nbsp com inux eas pan 安裝目錄 Redis 安裝 Window 下安裝 下載地址:https://github.com/MSOpenTech/redis/releases。 Redis 支持 32 位和 64 位。這個需

MySQL5.7在Windows安裝

如果 spa start 安裝 zip -- initial 反斜杠 目錄 本文講解從壓縮包安裝MySQL。 1.下載MySQL壓縮包,【Windows (x86, 64-bit), ZIP Archive】; 2.解壓Zip包到需要的目錄,例如D:\mysql-5.7.1

Windowspython 安裝Mysqldb模塊

64位 down font 這樣的 family png str alt bsp CMD執行 pip install mysql-python 報錯如下: 1.如果報類似 Microsoft Visual C++ 9.0 is required < Unable

mysql數據庫在Linux和windows安裝實現以及框架開發碰到的問題

自動啟動 過程 root mil 是否 call 啟動頁 同時 ice 2017年7月23號下午5:20分,上周我根據自己的實際情況,總結了mysql數據庫在windows系統下和linux系統下免安裝版本的實現,以及在項目開發中遇到的數據庫報錯,今天整理出來,以供日後學習

windowssorl安裝

img jar str 安裝完成 插入 文件拷貝 http close 沒有 1. JDK要求 Solr 4.10 要求JDK版本必須是1.7或更高。 2. 下載 下載地址: http://www.apache.org/dyn/closer.cgi/lucene/solr/

Windowscaffe安裝詳解(僅CPU)

net library dad 新建 math 錯誤 format ack 訓練集 本文大多轉載自 http://blog.csdn.net/guoyk1990/article/details/52909864,加入部分自己實戰心得。 1、環境:windows 7\VS20

windows手動安裝composer

img tar mps org 版本 技術分享 管理員 ges down 1.下載compser.phar 地址 https://getcomposer.org/download/ 2.新建composer.bat 文件,寫入“@php "%~dp0composer.pha

WindowsRabbitMQ安裝及入門

guest plugins sys def 一個 top new all num 1.Windows下安裝RabbitMQ需要以下幾個步驟 (1):下載erlang,原因在於RabbitMQ服務端代碼是使用並發式語言erlang編寫的,下載地址:http://www

WindowsPytesser安裝

需要 自己的 image 自己 size code 用戶 http 完全 安裝流程 詳細步驟 安裝PIL 32位機器:去到PIL官網進行安裝 64位機器:建議使用Pillow代替PIL,PIL官網的安裝包在64位機器下無法找到,安裝Pillow也

windowsxgboost安裝到python

class bash markdown mar date dml algo pre boost  初始環境 在安裝之前,我的anaconda2已經安裝好,git也有裝好 下載xgboost代碼 打開git bash ,到需要下載的目錄D:\Python\algorithm

windows如何安裝pip以及如何查看pip是否已經安裝成功

.com doc 現在 查看 pytho targe windows 只需要 install 最近剛學習python,發現很多關於安裝以及查看pip是否安裝成的例子都比較老,不太適合於現在(python 3.6 )因此,下一個入門級別的教程。 0:首先如何安裝python我

兄弟連學Python-windowsmongodb安裝與使用整理

not dbn 創建文件夾 upd 查詢 無法連接到數據庫 取模 save 正則 一、首先安裝mongodb 1.下載地址:http://www.mongodb.org/downloads 2.解壓縮到自己想要安裝的目錄,比如d:\mongodb 3.創建文件夾 d:\mo