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的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎:是目前全文搜索引擎的首选. ...
随机推荐
- ls --help 常用命令
$ ls --help Usage: ls [OPTION]... [FILE]... List information about the FILEs (the current directory ...
- textarea 标签 属性
textarea 标签 resize: vertical; 禁止横向拉伸 x resize: horizontal; 禁止竖向拉伸 y resize: none; 去掉拖动按钮
- MySQL语言 数据库练习题分解。
一. 设有一数据库,包括四个表:学生表(Student).课程表(Course).成绩表(Score)以及教师信息表(Teacher).四个表的结构分别如表1-1的表(一)~表( ...
- MySQL之单表查询 一 单表查询的语法 二 关键字的执行优先级(重点) 三 简单查询 四 WHERE约束 五 分组查询:GROUP BY 六 HAVING过滤 七 查询排序:ORDER BY 八 限制查询的记录数:LIMIT 九 使用正则表达式查询
MySQL之单表查询 阅读目录 一 单表查询的语法 二 关键字的执行优先级(重点) 三 简单查询 四 WHERE约束 五 分组查询:GROUP BY 六 HAVING过滤 七 查询排序:ORDER B ...
- python中的str和repr函数的区别
看了一些网上的解释,最主流的解释是“str是给人看的,repr是给机器看的”,如果已经理解了的,这句话是对的,但是是有问题的,对于没懂的,这句话是无法理解的. 我来尝试解释一下.先直译一下官方文档: ...
- eclipse 注销和取消注销
单行注释: CTRL + / 当行取消注释(一样的): CTRL + / 多行注释: CTRL + SHIFT + / 多行取消注释(斜杠换成反斜杠): CTRL + SHIFT + \
- GregorianCalendar公里类
使用GregorianCalendar 获得日期是年中第几周第几天 public class Common { /// <summary> /// 获取日期是年中的第几周 /// < ...
- 图的遍历算法:DFS、BFS
在图的基本算法中,最初需要接触的就是图的遍历算法,根据访问节点的顺序,可分为深度优先搜索(DFS)和广度优先搜索(BFS). DFS(深度优先搜索)算法 Depth-First-Search 深度优先 ...
- Copycat - 状态
Member.Status status的变迁是源于heartbeat heartbeat,append空的entries /** * Triggers a heartbeat to a majori ...
- Python操作Mysql数据库——多表组合查询
前面我们介绍了单张表的查询,包括模糊查询.分组.排序.各种筛选条件等等操作,在实际应用中,查询的数据往往不止局限在一张表里,通常需要多张表在一起进行组合查询,今天我们将会对Mysql当中的多张有关联的 ...