Mac安装elasticsearch以及可视化插件

安装 :brew install elasticsearch

安装成功后,查看版本信息 : elasticsearch --version

启动 :elasticsearch

默认启动端口9200 本地 http://localhost:9200/

安装node:brew install node

安装es可视化插件
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install

cd elasticsearch-head
npm install grunt --save

修改elasticsearch-head下Gruntfile.js文件,默认监听在127.0.0.1下9200端口

修改连接地址
cd elasticsearch-head/_site
vim app.js
this.base_uri = this.config.base_uri || this.prefs.get(“app-base_uri”) || “http://localhost:9200”;

启动服务:elasticsearch-head/node_modules/grunt/bin/grunt server
访问:http://localhost:9100/

集群健康值:显示“未连接”

解决方案:
vim /config/elasticsearch.yml
增加如下字段
http.cors.enabled: true
http.cors.allow-origin: “*”

重启es,并刷新head页面,发现已经可以连接上

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值