標籤:分享圖片 bin 打包壓縮 技術分享 ejs host photo href last
window 下安裝 elasticsearch
一、環境搭建需要的環境1、jdk環境2、Elasticsearch3、git 環境4、node 安裝包
二、進行環境的搭建1、解壓Elasticsearch 的壓縮包2、window 下進入bin 目錄下,開啟elasticsearch.bat 檔案
3、此時說明 Elasticsearch 環境搭建成功
4、將下載好的node 進行安裝,勁量不要 放到Elasticsearch 目錄下5、將node 添加到環境變數中6、grunt是一個很方便的構建工具,可以進行打包壓縮、測試、執行等等的工作,5.0裡的head外掛程式就是通過grunt啟動的。因此需要安裝grunt:注意:要切換到 node 的目錄進行操縱一下步驟
npm install -g grunt-cli
-g代表全域安裝。安裝路徑為C:\Users\yourname\AppData\Roaming\npm,並且自動加入PATH變數。安裝完成後檢查一下:
7、測試grunt 是否 安裝成功grunt -version8、從git 上下載 head 的源碼git clone git://github.com/mobz/elasticsearch-head.git9、修改head 的裡面的資訊
10、啟動 elasticsearch11、在head 的目錄下 執行npm install 語句 (時間會有點長,報錯了重新執行一遍)12、最後在 head 的目錄下 啟動nodejs ,執行 grunt service ,13、訪問網頁 http://localhost:9100
最後 es 搭建成功。
在elasticsearch.yml 中添加,本地 就可以了
http.cors.enabled: true
http.cors.allow-origin: "*"
windows下安裝elasticsearch6.2.4