win10 安裝ElasticSearch/es的Head插件


es5以上版本安裝head需要安裝node和grunt(之前的直接用plugin命令即可安裝)

(一)從地址:https://nodejs.org/en/download/ 下載相應系統的msi,雙擊安裝

 

 

 (二)安裝完成用cmd進入安裝目錄執行 node -v可查看版本號

 

 

 (三)執行 npm install -g grunt-cli 安裝grunt ,安裝完成后執行grunt -version查看是否安裝成功,會顯示安裝的版本號

 

 

 (四)開始安裝head

 ① 進入安裝目錄下的config目錄,修改elasticsearch.yml文件.在文件的末尾加入以下代碼

cluster.name: my-application
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
#這里的node-1為node-name配置的值
cluster.initial_master_nodes: ["node-1"] 
http.cors.enabled: true 
http.cors.allow-origin: "*"
node.master: true
node.data: true

②雙擊elasticsearch.bat重啟es

③在https://github.com/mobz/elasticsearch-head中下載head插件,選擇下載zip

 

 

 ④解壓到指定文件夾下,G:\elasticsearch\elasticsearch-head-master\ 進入該文件夾,修改G:\elasticsearch\elasticsearch-head-master\Gruntfile.js 在對應的位置加上hostname:'*'

 

 ⑤在G:\elasticsearch-6.6.2\elasticsearch-head-master\ 下執行npm install 安裝完成后執行grunt server 或者npm run start 運行head插件,如果不成功重新安裝grunt。成功如下

 

 ⑥瀏覽器下訪問http://localhost:9100/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM