ubuntu 16 安裝elasticsearch - head插件
阿新 • • 發佈:2018-04-27
使用 進入目錄 .com 插件 嘗試 執行 -s con conf
安裝node
apt install nodejs-legacy
安裝npm
apt install npm
npm install -g grunt-cli #安裝grunt命令行工具grunt-cli
npm install grunt --save-dev #安裝grunt及其插件
grunt -V #查看安裝版本情況
選擇一個目錄下執行下面命令,別把head插件clone後放到 elasticsearch的plugins目錄下,否則會報錯
git clone git://github.com/mobz/elasticsearch-head.git #git下載
cd elasticsearch-head #進入目錄
npm install # 如果npm使用很多錯誤,嘗試使用cnpm
npm install grunt --save #安裝grunt到模塊中並保存
(1):修改elasticsearch安裝目錄下的config/elasticsearch.yml
# 增加如下字段
http.cors.enabled: true
http.cors.allow-origin: "*"
(2):修改elasticsearch-head下的Gruntfile.js
其中增加一個
hostname: ‘0.0.0.0‘ 或者是 hostname: ‘*‘
ubuntu 16 安裝elasticsearch - head插件