windows下安裝elasticsearch
阿新 • • 發佈:2018-12-16
一、安裝elasticsearch
2、 進入到C:\elasticsearch-5.3.0\bin
執行elasticsearch.bat
3、開啟瀏覽器 http://localhost:9200/
二、 elasticsearch-head外掛
1、下載node 然後安裝(完成後 node-v檢視版本)
2、安裝grunt **切換到nodejs安裝目錄下 npm install -g grunt-cli
- -g代表全域性安裝。安裝路徑為
C:\Users\{yourname}\AppData\Roaming\npm
,並且自動加入PATH變數。 - 檢視版本號
grunt -version
3、下載head外掛(elasticsearch-head-master)
4、修改F:\elasticsearch-head-master\Gruntfile.js
5、修改F:\elasticsearch-head-master\_site\app.js
6、F:\elasticsearch-5.5.2\config\elasticsearch.yml新增
cluster.name: es-5.5.2-test #換個叢集的名字,免得跟別人的叢集混在一起
node.name: node-es-101 #換個節點名字
network.host: 0.0.0.0 #修改一下ES的監聽地址,這樣別的機器也可以訪問
http.port: 9200 #埠號,預設就好
# 增加新的引數,這樣head外掛可以訪問es
http.cors.enabled: true
http.cors.allow-origin: "*"
7、安裝head
進入F:\elasticsearch-head-master 執行 npm install(安裝有點慢)
完成後grunt server