Elasticsearch-head安装

1、在安装Elasticsearch-head之前,我们首先安装node.js
我们将node-v8.11.1-linux-x64.tar.gz上传至/usr/local/node目录
解压

cd /usr/local/node/
tar -zxvf node-v8.11.1-linux-x64.tar.gz

将nodejs添加至系统环境变量,修改/etc/profile文件,文件底部添加

export NODE_HOME=/usr/local/node/node-v8.11.1-linux-x64
export PATH=$NODE_HOME/bin:$PATH

刷新环境变量

source /etc/profile

查看node版本

node -v

在这里插入图片描述

2、安装elasticsearch-head
安装git

yum install -y git

bash:git:command not found解决方法
原创 2014年03月11日 08:50:27
执行git --version时出现bash:git:command not found。
解决方法:打开/etc/profile, 找到path manipulation那一行,在下面的if then中添加 pathmunge 命令路径 (如:pathmunge /opt/git/git-1.9.0/bin)。然后执行source /etc/profile, 再次执行git --version就可执行成功,会显示git的版本号。

下载elasticsearch-head.git

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install

在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行

cd elasticsearch-head
npm install grunt --save 

修改head配置
vim /opt/elasticsearch/elasticsearch-head/Gruntfile.js
添加hostname字段,如下
在这里插入图片描述
启动head
进入目录 cd /opt/elasticsearch/elasticsearch-head/node_modules/grunt/bin
前台启动:./grunt server
后台启动:nohup ./grunt server &
访问head
http://192.168.10.120:9100/
在这里插入图片描述
如果访问失败,请修改elasticsearch的配置文件

http.cors.enabled: true
http.cors.allow-origin: "*"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值