elasticsearch7.0 搭建可视化插件 学习三

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29556507/article/details/89669575

我的环境是ubuntu16.04  内存2g

1.安装node

sudo apt install nodejs-legacy -y

2.下载

sudo git clone git://github.com/mobz/elasticsearch-head.git

sudo unzip elasticsearch-head.zip

3.安装grunt

cd elasticsearch-head
sudo npm install -g grunt --registry=https://registry.npm.taobao.org
npm install

在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行:

sudo npm install grunt --save 

4.修改配置 elasticsearch-head下Gruntfile.js文件

修改connect配置节点修改前

扫描二维码关注公众号,回复: 6396080 查看本文章

修改后

修改 _site/app.js 修改http://localhost:9200字段到本机ES端口与IP 修改和你的ip是一致的

5.修改 elasticsearch配置文件 

 修改elasticsearch.yml文件加入以下内容:

# 是否支持跨域
http.cors.enabled: true

# *表示支持所有域名
http.cors.allow-origin: "*"

6.启动head插件服务(后台运行)

/elasticsearch-head/node_modules/grunt/bin/grunt server &

猜你喜欢

转载自blog.csdn.net/qq_29556507/article/details/89669575