elasticsearch-5.5.1安装head客户端
1、安装nodejs、npm、gruntcurl -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 -vv6.11.2
# npm -v3.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.org3、安装完成之后,对elasticesearch进行以下配置
在/data/ELK/elasticesearch/config/elasticesearch.yml文件末端新增以下内容:http.cors.enabled: truehttp.cors.allow-origin: "*"4、修改head相关配置
在/data/ELK/head/Gruntfile.js文件中找到 connect,新增hostnameconnect: { 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?
页:
[1]