ubuntu 16 install elasticsearch-head plugin

install node

apt install nodejs-legacy

install npm

apt install npm
 npm install -g grunt-cli  #安装grunt命令行工具grunt-cli

npm install grunt --save-dev  #安装grunt及其插件

grunt -V   #查看安装版本情况

Select a directory to execute the following command, do not clone the head plugin and put it in the plugins directory of elasticsearch, otherwise an error will be reported

git clone git://github.com/mobz/elasticsearch-head.git   #git下载  

cd elasticsearch-head #Enter the directory

npm install  # 如果npm使用很多错误,尝试使用cnpm

npm install grunt --save  #安装grunt到模块中并保存

(1): Modify config/elasticsearch.yml in the elasticsearch installation directory

# Add the following fields

http.cors.enabled: true
http.cors.allow-origin: "*"

(2): Modify Gruntfile.js under elasticsearch-head

add one of them

hostname: '0.0.0.0' or hostname: '*'

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324952298&siteId=291194637