elasticsearch-head安装步骤

依赖:node环境。

elk安装elasticsearch-head步骤

npm install -g grunt-cli
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install -g cnpm --registry=https://registry.npm.taobao.org
2、修改Elasticsearch配置文件

编辑elasticsearch-5.1.1/config/elasticsearch.yml,加入以下内容:

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

3、修改Gruntfile.js

打开elasticsearch-head/Gruntfile.js,找到下面connect属性,新增hostname: ‘0.0.0.0’:

connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
}

4、修改elasticsearch-head/_site/app.js
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") ||"http://10.10.93.32:9200";
5、启动

cd /data1/xinsrv/elasticsearch-head
nohup npm run start & &>/dev/null

  • 启动失败的话在执行npm install 执行后再次执行start

    注意点:

可以修改elasticsearch-head的 Gruntfile.js 文件添加hostname如下

 hostname: "10.70.1.224",
 port: 9100,
 base: '.',
 keepalive: true
6、x-pack认证访问

http://10.70.93.93:9100/?auth_user=kibana&auth_password=kibana

注意:
es集群修改elasticsearch.yml配置添加
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

转载于:https://www.cnblogs.com/stone1989/p/10303031.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值