• Elasticsearchhead


    安装head插件:需要有git环境,nodejs环境

    head插件下载 安装步骤参考 : https://github.com/mobz/elasticsearch-head

    git clone git://github.com/mobz/elasticsearch-head.git
    cd elasticsearch-head
    npm install
    npm run start
    
    运行npm install 会报错:
    
    npm ERR! path /usr/local/elasticsearch-head/node_modules/phantomjs-prebuilt
    
    这是因为系统缺少bzip2 :   yum -y install bzip2.x86_64
    
    安装完成,再运行npm install就解决了
    
    网上那么多文章什么乱七八糟的都解决不了问题
    
    真解决问题的是这篇 https://www.cnblogs.com/gwyy/p/12205253.html
    
    

    安装完成之后到项目根目录下运行启动 npm run start

    
    [root@localhost elasticsearch-head]# npm run start
    
    > elasticsearch-head@0.0.0 start
    > grunt server
    
    Running "connect:server" (connect) task
    Waiting forever...
    Started connect web server on http://localhost:9100
    
    
    

    配置ES允许跨域访问

    vi config/elasticsearch.yml
    
    http.cors.enabled: true
    http.cors.allow-origin: "*"
    
    

    head插件依赖 grunt-cli

    全局安装命令: npm install -g grunt-cli

    grunt 与 grunt-cli的区别参考 https://www.gruntjs.net/getting-started

    [root@localhost elasticsearch-head]# grunt --version
    grunt-cli v1.4.3
    grunt v1.0.1
    
    
    

    packge.json文件依赖grunt , 运行项目的时候需要用到grunt-cli客服端 : grunt server

  • 相关阅读:
    农场灌溉问题(回溯)
    六数码问题(广搜_队列)
    求图像周长(回溯)
    六数码问题(回溯)
    花生米(四)
    活动安排(贪心算法)
    自我介绍
    三位老师
    培训期间
    工作十个月感触
  • 原文地址:https://www.cnblogs.com/zqsb/p/15925653.html
Copyright © 2020-2023  润新知