需要nodejs和git的支持

brew install node

查看是否安装成功 node -v 

➜  ~ node -v
v6.9.2
➜  ~

看到版本,说明安装成功

➜  ~ git --version
git version 2.9.3 (Apple Git-75)
➜  ~

本机已经有git

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

cd elasticsearch-head

npm install

npm run start

open http://localhost:9100/

配置elasticsearch,允许head插件访问

进入配置文件修改head权限

cd /usr/local/etc/elasticsearch/ 

vim elasticsearch.yml

添加,保存

http.cors.enabled: true                # elasticsearch中启用CORS
http.cors.allow-origin: "*"         # 允许访问的IP地址段,* 为所有IP都

Mac安装elasticsearch-- head插件

需要重新启动elasticsearch,

进入elasticsearch-head目录,一定要进入这个目录才能执行npm run start命令,实际上是找目录下的package.json文件。

重新执行npm run start。否则会出现跨域问题。授权后要重启ES和head插件

重新进入http://localhost:9100/

Mac安装elasticsearch-- head插件

 

 

相关文章:

  • 2021-12-16
  • 2021-06-22
  • 2021-06-23
  • 2021-08-12
  • 2021-06-06
  • 2022-12-23
猜你喜欢
  • 2021-12-30
  • 2021-11-22
  • 2021-11-22
  • 2021-11-22
  • 2021-06-17
  • 2021-12-12
相关资源
相似解决方案