ElasticSearch6.2.3安装Head插件
1、环境
Linux centos7
elasticsearch-head的zip包,github网址如下:https://github.com/mobz/elasticsearch-head
nodejs的linux对应位数下载:https://nodejs.org/en/download/

2、安装nodejs
解压后如下图所示:
进入bin执行下面的三个可执行文件:

[root@mycentos bin]# ./node -v
[root@mycentos bin]# ./npm -v
[root@mycentos bin]# ./npx -v
执行./npm -v会报错如下:
/usr/bin/env: node: 没有那个文件或目录
此时需要配置环境变量即可,修改/etc/profile,行尾追加如下命令:
[root@mycentos ~]# vim /etc/profile export NODE_HOME=/opt/nodejs/node-v8.9.4-linux-x64/
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules
#执行命令生效:
[root@mycentos ~]# source /etc/profile
3、安装elasticsearch-head
进入到elasticsearch-head主目录执行:
[elastic@mycentos elasticsearch-head-master]$ npm install
安装过程中出现错误:
Please report this full log at https://github.com/Medium/phantomjs
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! phantomjs-prebuilt@2.1.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js
解决方案如下:
#忽略脚本继续进行安装
npm install phantomjs-prebuilt@2.1. --ignore-scripts
最终安装成功!成功后当前目录多了一个node_modules文件夹。
4、配置
(1)配置Head主目录下的Gruntfile.js,默认文件中是没有hostname属性的,我们需要手动添加:
connect: {
server: {
options: {
port: 9100,
base: '.',
keepalive: true,
hostname: '*'
}
}
}
(2)配置elasticsearch 的启动配置文件:
为什么需要修改配置文件:
head插件连接elasticsearch需要注意的点:
因为head插件是一个独立进程,启动后是一个独立的服务器外加端口,比如我的虚拟机ip地址:http://192.168.0.111:9100/
而elasticsearch启动后也是一个独立的进程,ip地址:http://192.168.0.111:9200/
这样两个独立进程,虽然服务器ip地址相同,但是端口不同,此时会发生跨域的情况。。
于是官方给出这样一段话,我们在对elasticsearch启动的时候追加两个配置文件属性即可防止跨域。
#在文件末尾添加即可
http.cors.enabled: true
http.cors.allow-origin: "*"
5、启动Head插件
#切回到head的主目录下,执行如下命令
[elastic@mycentos elasticsearch-head-master]$ npm run start

然后在浏览中打开:http://localhost:9100

安装完毕!
ElasticSearch6.2.3安装Head插件的更多相关文章
- (新)elasticsearch6.0版本安装head插件
ES6.0版本安装head插件 1.1 前言 不知道是我电脑问题还是最近的开源软件都比较**,mysql和elasticsearch新版本变动都比较大. elasticsearch6.0貌似已经不支持 ...
- elasticsearch6.0版本安装head插件
ES6.0版本安装head插件 1.1 前言 不知道是我电脑问题还是最近的开源软件都比较**,mysql和elasticsearch新版本变动都比较大. elasticsearch6.0貌似已经不支持 ...
- ES之一:Elasticsearch6.4 windows安装 head插件ik分词插件安装
准备安装目标:1.Elasticsearch6.42.head插件3.ik分词插件 第一步:安装Elasticsearch6.4 下载方式:1.官网下载 https://www.elastic.co/ ...
- (转)elasticsearch6.0版本安装head插件
1.1 前言 不知道是我电脑问题还是最近的开源软件都比较**,mysql和elasticsearch新版本变动都比较大. elasticsearch6.0貌似已经不支持命令行安装head插件了,反正我 ...
- Elasticsearch6.2.1安装elasticsearch-sq插件
参考 https://github.com/NLPchina/elasticsearch-sql 1.下载插件 wget https://github.com/NLPchina/elasticsear ...
- ELK(Elasticsearch6.0以上版本head插件安装)
参考:https://www.cnblogs.com/Onlywjy/p/Elasticsearch.html Elasticsearch6.0不能使用命令直接安装head插件 修改配置文件/etc/ ...
- elasticsearch6.6.0安装配置及elasticsearch-head插件安装
一.最小化安装centos7.6 cat /etc/redhat-release 二.配置网络,可以上外网 三.安装常用命令工具,修改系统时区,校对系统时间,关闭selinux,关闭firewalld ...
- windows下安装elasticsearch-6.4.3和elasticsearch-head插件
windows下安装elasticsearch-6.4.3和elasticsearch-head插件 博客分类: elasticsearch es ElasticSearch下载地址:https:/ ...
- elasticsearch-6.0.1安装
elasticsearch-6.0.1安装 0. 介绍: ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎:是目前全文搜索引擎的首选. ...
随机推荐
- python爬取并批量下载图片
import requests from lxml import etree url='http://desk.zol.com.cn/meinv/' add1='.html' urls=[] i = ...
- hdparm命令(转)
转自:http://man.linuxde.net/hdparm hdparm命令提供了一个命令行的接口用于读取和设置IDE或SCSI硬盘参数. 语法 hdparm(选项)(参数) 选项 -a< ...
- 2018ACM-ICPC南京区域赛M---Mediocre String Problem【exKMP】【Manacher】
这题就单独写个题解吧.想了两天了,刚刚问了一个大佬思路基本上有了. 题意: 一个串$S$,一个串$T$,在$S$中选一段子串$S[i,j]$,在$T$中选一段前缀$T[1,k]$使得$S[i,j]T[ ...
- ubuntu16.04安装kinetic调用gazebo_control解决方案
解决方案 sudo apt-get install ros-kinetic-gazebo-ros-control
- 一、SQL定义变量
http://blog.csdn.net/changwei07080/article/details/7561602 在SQL我们使用declare定义局部变量,同时可以使用set和select 对变 ...
- Yarn && npm设置镜像源
安装yarn npm i -g yarn yarn yarn config set registry https://registry.npm.taobao.org --global yarn con ...
- wslgit
@echo off setlocal enabledelayedexpansion set command=%* If %PROCESSOR_ARCHITECTURE% == x86 ( echo | ...
- IndentationError: expected an indented block 在继承中出现的问题:未完
1. class Foo(object): def __init__(self,name,price,period): self.name=name self.price=price self.per ...
- 《HTTP - http首部信息》
推荐一首歌 - 僕が死のうと思ったのは (曾经我也想过一了百了) 也就听了几十遍而已 经历一番波折,终于正式到了北京. 刚开始是很艰难的,多走两步就好了,不是么. 1:首部字段 Cache-Contr ...
- tensorflow入门笔记(四) tf.summary 模块
模块内的函数: tf.summary.audio(name, tensor, sample_rate, max_outputs=3, collections=None, family=None) 输出 ...