centos7 安装 elasticsearch-head-master

本文详细介绍了如何安装和配置 Elasticsearch Head,这是一个用于 Elasticsearch 的可视化工具。包括安装 node.js,配置 Gruntfile.js 和 app.js 文件,以及如何修改 Elasticsearch 的配置以支持 CORS。此外,还提供了开启防火墙端口和启动工具的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

elasticsearch-head-master是一个可视化工具

安装elasticsearch-head-master的前提需要安装node.js

 

1.下载elasticsearch-head-master

https://github.com/mobz/elasticsearch-head

2. 解压elasticsearch-head-master

sudo unzip elasticsearch-head-master.zip

 

3. 切换到安装node.js目录

npm install -g grunt-cli

npm install

如果连个命令出现错误,

npm cache clean --force

4.修改elasticsearch-head-master的Gruntfile.js,增加hostname, 修改为hostname: '*',

 cd elasticsearch-head-master

vi Gruntfile.js

 

5.修改elaticsearch服务器的地址。

vi /usr/local/elasticsearch-head-master/_site/app.js

 

6.修改/usr/local/elasticsearch-5.0.0/config

       最下面增加配置

 

  http.cors.enabled: true
  http.cors.allow-origin: "*"
  http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
  http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"

7. 打开防火墙9100端口

 

8. 进入elasticsearch-head-master目录启动

 

    grunt server

如果启动 报错

    npm install grunt --save-dev

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值