首页 > 其他 > 详细

elasticsearch-5.5.1安装head客户端

时间:2017-08-17 12:23:18      阅读:440      评论:0      收藏:0      [点我收藏+]

1、安装nodejs、npm、grunt


curl -sL -o /etc/yum.repos.d/khara-nodejs.repo https://copr.fedoraproject.org/coprs/khara/nodejs/repo/epel-7/khara-nodejs-epel-7.repo

 然后安装 yum install -y nodejs nodejs-npm


查看版本号,验证是否安装成功

# node -v

v6.11.2

# npm -v

3.10.10

打印版本号,证明安装成功。

2、安装grunt、grunt-cli

# npm install -g grunt-cli

# npm install -g grunt

下载head源码,下载地址

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

存放在/data/ELK/目录下

# mv elasticsearch-head head

# cd head

执行以下命令开始安装依赖

npm install -g cnpm --registry=https://registry.npm.taobao.org

3、安装完成之后,对elasticesearch进行以下配置


在/data/ELK/elasticesearch/config/elasticesearch.yml文件末端新增以下内容:

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

4、修改head相关配置


在/data/ELK/head/Gruntfile.js文件中找到 connect,新增hostname

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

5、启动head服务


在/data/ELK/head目录下启动服务器

nohup grunt server & //后台运行命令


# losf -i:9100 查看端口是否正常启动监听

6、访问后台

在浏览器中访问

http://192.168.40.249:9100

技术分享

总结:启动grunt server时抛出以下异常,需要逐个安装(npm install grunt-contrib-clean)。

>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-concat" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?


本文出自 “胡哥” 博客,请务必保留此出处http://huwenjie.blog.51cto.com/3552670/1956969

elasticsearch-5.5.1安装head客户端

原文:http://huwenjie.blog.51cto.com/3552670/1956969

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!