linux下es-head安装及配置

Posted two-bees

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下es-head安装及配置相关的知识,希望对你有一定的参考价值。

与es同级目录下:

wget https://github.com/mobz/elasticsearch-head/archive/master.zip
unzip master.zip
cd elasticsearch-head-master
npm install –g grunt–cli

因为es是brian账户下的,而我使用的是root账户,所以权限有问题

chown -R brian:root /home/app/elasticsearch/elasticsearch-head-master/

安装

npm install

head安装完成后,将es后台启动、head也运行起来

./elasticsearch-5.5.1/bin/elasticsearch -d 
/home/app/elasticsearch/elasticsearch-head-master下:npm run start

因为es是端口9200,而head插件是9100,,解决跨域问题:

elasticsearch-5x下的 config/elasticsearch.yml
http.cors.enabled: true
http.cors.allow-origin: "*"

我是在虚拟机上安装的,使用windows浏览器访问,所以就不能127.0.0.1了,要ip:9200访问

技术图片

 

以上是关于linux下es-head安装及配置的主要内容,如果未能解决你的问题,请参考以下文章