1、安裝前提
windows下已經安裝好了jdk8的版本
2、下載ElasticSearch
https://www.elastic.co/cn/downloads/elasticsearch#ga-release ------下載zip包,將下載的zip文件解壓后,直接運行bin下的elasticsearch.bat這個文件,然后訪問本機的127.0.0.1:9200,出現以下圖說明es安裝成功。
3、安裝nodejs
3.1下載地址:https://nodejs.org/en/download/ 根據自己系統下載相應的msi,雙擊安裝
3.2使用node -v查看自己nojs的版本,使用npm -v查看npm的版本,執行 npm install -g grunt-cli命令,安裝grunt
執行 npm install -g grunt-cli 安裝grunt ,安裝完成后執行grunt -version查看是否安裝成功,會顯示安裝的版本號
4 開始安裝head
① 進入安裝目錄下的config目錄,修改elasticsearch.yml文件.在文件的末尾加入以下代碼
-
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true雙擊elasticsearch.bat重啟es
4.2 https://github.com/mobz/elasticsearch-head 下載zip文件,然后解壓到制定目錄,見圖二
4.3修改E:\elasticsearch-5.4.1\elasticsearch-head-master\Gruntfile.js
在G:\elasticsearch-6.6.2\elasticsearch-head-master 下執行npm install 安裝完成后執行grunt server 或者npm run start 運行head插件,如果不成功重新安裝grunt。成功如下
瀏覽器下訪問http://localhost:9100/
success!!!!