標籤:es
Windows環境搭建Elasticsearch 5.* 需要JDK1.8;
1、下載Elasticsearch
https://www.elastic.co/cn/downloads/elasticsearch#ga-release
因為是windows版本,所以下載zip即可
2、解壓,我的目錄位置:“E:\es\elasticsearch-5.4.1”
在該檔案夾的bin目錄下雙擊elasticsearch.bat執行,完成後任意瀏覽器鍵入127.0.0.1:9200,
3、安裝node
5以上版本安裝head需要安裝node和grunt(1.*,2.*直接用plugin命令即可安裝)
:https://nodejs.org/en/download/ 根據自己系統下載相應的msi,雙擊安裝。
安裝完成用cmd進入安裝目錄執行 node -v可查看版本號碼
在同一目錄下執行 npm install -g grunt-cli命令,安裝grunt 完出現一堆黃字 證明安裝成功
4、安裝head
ctrl+c退出es
修改elasticsearch.yml檔案
在檔案最後加入
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
放開network.host: 192.168.0.1的注釋並改為network.host: 0.0.0.0
放開cluster.name;node.name;http.port的注釋
雙擊elasticsearch.bat重啟es
https://github.com/mobz/elasticsearch-head 下載zip檔案
壓到指定檔案夾下,我的檔案夾是E:\es\elasticsearch-5.4.1\elasticsearch-head-master\
進入該檔案夾,修改E:\es\elasticsearch-5.4.1\elasticsearch-head-master\Gruntfile.js
進入E:\es\elasticsearch-5.4.1\elasticsearch-head-master\_site修改app.js 中下文內容為伺服器位址,如果是本機部署不修改也可以。
cmd進入E:\es\elasticsearch-5.4.1\elasticsearch-head-master檔案夾
執行 npm install
安裝完成執行grunt server 或者npm run start(以後每次),出現證明安裝成功,如果還不成功,退出es再執行一次npm install -g grunt-cli
6、安裝完成查看結果127.0.0.1:9100
http://blog.csdn.net/u012270682/article/details/72934270
Windows環境搭建Elasticsearch 5.*並配置head