美文网首页
elasticsearch-5x 安装head插件

elasticsearch-5x 安装head插件

作者: black3y | 来源:发表于2016-12-27 00:09 被阅读0次
  1. 下载head插件
$ apt-get install git
$ git clone git://github.com/mobz/elasticsearch-head.git
$ mv elasticsearch-head /usr/share/head
$ chmod -R 777 /usr/share/head
  1. 下载安装node
    下载源:https://nodejs.org/en/download/
    此处下载https://nodejs.org/dist/v6.9.2/node-v6.9.2-linux-x64.tar.xz
    解压:
$ xz -d node-v6.9.2-linux-x64.tar.xz
$ tar -xvf node-v6.9.2-linux-x64.tar
$ mv node-v6.9.2-linux-x64 /usr/share/node-v6.9.2-linux-x64
  1. 配置环境变量
$ vim /etc/profile 添加下面一行
export export PATH=/usr/share/node-v6.9.2-linux-x64/bin:$PATH

使配置文件生效

$ source /etc/profile

查看是否配置成功:

$ node -v
$ npm -v
  1. 指定npm源为淘宝的
$ npm config set registry https://registry.npm.taobao.org
  1. 安装grunt
$ npm install grunt --save-dev
$ npm install -g grunt-cli

查看是否安装成功以及版本:

$ grunt -V
  1. 修改head源码
    编辑/usr/share/head/Gruntfile.js
$ vim /usr/share/head/Gruntfile.js
connect: {
    server: {
        options: {
            port: 9100,
            hostname: '0.0.0.0',
            base: '.',
            keepalive: true
        }
    }
}
  1. 运行head
$ npm install
$ grunt server
$ grunt server &  #后台启动
  1. 打开http://es-ip:9100查看

相关文章

网友评论

      本文标题:elasticsearch-5x 安装head插件

      本文链接:https://www.haomeiwen.com/subject/umqsvttx.html