elasticsearch-head 安装
一、安装phantomjs(由于入坑多写一步,此步骤可省掉)
1.下载phantomjs
安装npm的时候会依赖phantomjs 所以我们先安装phantomjs
phantomjs 下载地址:http://phantomjs.org/download.html
可以复制下载地址通过命令来下载,如下
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
2.解压安装包
① yum install bzip2
② bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2
③ tar -xvf phantomjs-2.1.1-linux-x86_64.tar
3.安装(由于我的解压目录在 /home/tools/phantomjs-2.1.1-linux-x86_64,所以后面就直接写绝对路径了)
① 将可执行文件放入系统路径
ln -s /home/tools/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
② 安装依赖——fontconfig和freetype
yum install fontconfig freetype2
③ 配置环境变量
vim /etc/profile
export PHANTOMJS=/home/tools/phantomjs-2.1.1-linux-x86_64
export PATH=$PATH:$PHANTOMJS/bin
保存后执行:source /etc/profile
④ 测试 执行如下命令会显示phantomjs的版本
phantomjs -v
二、安装node
1.检测node环境 (如果存在可以直接看第三步)
node -v
2.安装 node
① 下载nodejs 下载地址:https://nodejs.org/en/download/
wget https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x64.tar.xz
② 解压 node
xz -d node-v8.11.2-linux-x64.tar.xz
tar -xvf node-v8.11.2-linux-x64.tar
③ 建立软连接,变为全局
ln -s /home/tools/node/node-v8.11.2-linux-x64/bin/node /usr/local/bin/node
ln -s /home/tools/node/node-v8.11.2-linux-x64/bin/npm /usr/local/bin/npm
④ 安装 npm,grunt
npm install -g cnpm
npm install -g grunt-cli
⑤ 配置环境变量
vim /etc/profile
在文件最后添加
export NODE_HOME=/home/tools/node/node-v8.11.2-linux-x64
export PATH=$PATH:$NODE_HOME/bin
保存后执行 source /etc/profile
⑥ 测试
node -v
npm -v
grunt -version
三、安装 elasticsearch-head
elasticsearch-head 的开源地址:https://github.com/mobz/elasticsearch-head
1.下载并解压
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
unzip master.zip //如果没有unzip这个命令 可以通过 yum install unzip 进行安装
2.安装
进入解压好的目录 cd elasticsearch-head-master 执行 npm install
很多教程都这么讲的,此时我入坑了,会出现以下问题
将 npm install 改为 npm install -g 即可
测试:在elasticsearch-head-master 目录下启动 nodejs : grunt server
通过浏览器访问:http://ip:9100 如下
四、跨域问题处理
1.问题说明
上诉步骤执行完以后启动elasticsearch服务会发现 elasticsearch-head插件连接不上elasticsearch服务,此时可查看浏览器控制台有跨域的错误出现
2.问题处理
编辑 elasticsearch 服务 config/elasticsearch.yml
在文件的最后加入
http.cors.enabled: true
http.cors.allow-origin: "*"
保存文件,从启elasticsearch服务,再次连接,即可成功,如图
elasticsearch-head 安装的更多相关文章
- 如何在Elasticsearch中安装中文分词器(IK+pinyin)
如果直接使用Elasticsearch的朋友在处理中文内容的搜索时,肯定会遇到很尴尬的问题--中文词语被分成了一个一个的汉字,当用Kibana作图的时候,按照term来分组,结果一个汉字被分成了一组. ...
- elasticsearch rpm 安装
参考:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html Dow ...
- Linux初学 - Elasticsearch环境安装
下载 https://www.elastic.co/downloads/elasticsearch 安装 rpm -ivh 也可以双击rpm包安装 修改elastaticsearch host配置 修 ...
- centos 6.7下 elasticsearch的安装
1.下载elasticsearch的安装包,用ftp上传到linux系统下目录中,如在当前用户root的目录下新建目录elasticsearch,放入安装包 不要忘了添加执行权限 chmod +x * ...
- 转:ElasticSearch的安装和相关插件的安装
原文来自于:http://blog.csdn.net/whxaing2011/article/details/18237733 本文主要介绍如下内容: 1.ElasticSearch ...
- ElasticSearch的安装
一.安装javaSE环境(已配java环境变量的请直接跳过) 1.从Java JDK 官网下载适合自己的jdk版本.(我自己用的jdk1.7) 2.安装jdk后,配置java环境变量(ps:比较喜欢简 ...
- Centos7部署elasticsearch并且安装ik分词以及插件kibana
第一步 下载对应的安装包 elasticsearch下载地址:https://www.elastic.co/cn/downloads/elasticsearch ik分词下载:https://gith ...
- Elasticsearch环境安装配置
安装Elasticsearch的步骤如下 - 第1步 - 查看安装在计算机上的java的最低版本,它要求java 7或以上或最新的版本.可以通过执行以下操作进行检查 - 在Windows操作系统(OS ...
- ElasticSearch搜索引擎安装配置拼音插件pinyin
近几篇ElasticSearch系列: 1.阿里云服务器Linux系统安装配置ElasticSearch搜索引擎 2.Linux系统中ElasticSearch搜索引擎安装配置Head插件 3.Ela ...
- ElasticSearch搜索引擎安装配置中文分词器IK插件
近几篇ElasticSearch系列: 1.阿里云服务器Linux系统安装配置ElasticSearch搜索引擎 2.Linux系统中ElasticSearch搜索引擎安装配置Head插件 3.Ela ...
随机推荐
- RPM包和YUM仓库管理
1.RPM包管理 RPMRPM Package Manger,前身Redhat Package Manger,由红帽开发用于软件包的安装升级卸载与查询有一个完整的数据库体系,每个RPM包的所有信息都固 ...
- orthologs|paralogs
从这里我们可以举例说明,例如人的S100A8基因与猪的S100A8基因即为orthologs.人的a球蛋白和b球蛋白基因即为paralogs.需要补充的是,人的a球蛋白和鼠的b球蛋白基因也为paral ...
- linux上部署jenkins
http://www.pianshen.com/article/1133171043/相关jenkins链接 下载jenkins的war包:https://blog.csdn.net/Aaron_Zh ...
- EXAM-2018-8-3
EXAM-2018-8-3 D H 喜闻乐见的水题 J lower_bound + upper_bound 一个可以查找第一个大于,另一个可查找第一个不小于. F 找规律+奇偶分析 偶数好找,就是奇数 ...
- hibernate中lazy的使用
lazy,延迟加载 Lazy的有效期:只有在session打开的时候才有效:session关闭后lazy就没效了. lazy策略可以用在: * <class>标签上:可以取值true/fa ...
- UTF虚拟对象
虚拟对象: 虚拟对象是为了让UFT识别某些不能识别的控件,把这些控件的范围定义为虚拟对象. 新建虚拟对象 管理虚拟对象 创建虚拟对象之后可通过菜单tools-Virutal Objects-Virut ...
- 90)PHP,提示跳转代码展示
(1)JS中的Location:href= 来跳转 (2)PHP中的header(“Refresh:time:url:目的url”); 这个Refresh是在发生多少秒后发生变化. 代码展示: be ...
- Qt unsigned char *与QString之间的相互转换
//unsiged char *转QString unsigned char *str = "fdd" ; char *str1 = (char *)str; QString s ...
- Python实现:生产者消费者模型(Producer Consumer Model)
#!/usr/bin/env python #encoding:utf8 from Queue import Queue import random,threading,time #生产者类 clas ...
- 3DSMAX 卸载工具,完美彻底卸载清除干净3dsmax各种残留注册表和文件
一些同学安装3dsmax出错了,也有时候想重新安装3dsmax的时候会出现这种本电脑已安装3dsmax,你要是不留意直接安装,只会安装3dsmax的附件,3dsmax是不会安装上的.这种原因呢就是大家 ...