elasticsearch-head安装前准备

1.操作系统
64位CentOS Linux release 7.2.1511 (Core)
2.git是必需的
elasticsearch-head是一款开源软件,被托管在github上面,所以如果我们要使用它,必须先安装git,通过git获取elasticsearch-head。我一开始在centos上装了git,但是后来仔细一想,我windows上已经装过了,没必要为了获取elasticsearch-head再在centos上装git。不过既然已经装了,那我们就在centos上获取吧。
可参考我的另一片文章安装git:centos7安装git
3.nodejs也是必需的
运行elasticsearch-head会用到grunt,而grunt需要npm包管理器,所以nodejs是必须要安装的。
可参考我的另一片文章安装nodejs:centos7安装nodejs
4.单独部署elasticsearch-head
elasticsearch5.0之后,elasticsearch-head不做为插件放在其plugins目录下了,所以可以单独部署一台服务器,没必要和elasticsearch部署在同一台机器

下载elasticsearch-head

使用git拷贝elasticsearch-head到本地

[root@localhost local]# cd /usr/local/

[root@localhost local]# git clone git://github.com/mobz/elasticsearch-head.git

安装elasticsearch-head依赖包

[root@localhost _site]# cd /usr/local/elasticsearch-head/

[root@localhost local]# cnpm install

如果出现下面的黄色警告,不用管,不影响使用。

npminstall WARN package.json not exists: /usr/local/package.json

修改Gruntfile.js

[root@localhost _site]# cd /usr/local/elasticsearch-head/

[root@localhost elasticsearch-head]# vi Gruntfile.js

在connect-->server-->options下面添加:hostname:’*’,允许所有IP可以访问

修改elasticsearch-head默认连接地址:

[root@localhost elasticsearch-head]# cd /usr/local/elasticsearch-head/_site/

[root@localhost _site]# vi app.js

将this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";中的localhost修改成你es的服务器地址,我的是:192.168.1.60:9200

配置elasticsearch允许跨域访问

进入elasticsearch服务器,打开elasticsearch的配置文件elasticsearch.yml,在文件末尾追加下面两行代码即可:

http.cors.enabled: true

http.cors.allow-origin: "*"

打开9100端口

如果想在别的机器上访问,防火墙必须开启9100端口

永久打开9100端口

[root@localhost elasticsearch-head]# firewall-cmd --zone=public --add-port=9100/tcp --permanent

重启防火墙

[root@localhost elasticsearch-head]# firewall-cmd --reload

启动elasticsearch

这里就不介绍了。

只有启动了elasticsearch,连接的时候才能连接上。

下面是我个人整理的一些笔记,有兴趣可以看下

centos7安装elasticsearch5.2.2

centos7 elasticsearch集群部署

centos7 elasticsearch之kibana安装

启动elasticsearch-head

[root@localhost _site]# cd /usr/local/elasticsearch-head/

[root@localhost elasticsearch-head]# node_modules/grunt/bin/grunt server

[root@localhost elasticsearch-head]# cd /usr/local/elasticsearch-head/
[root@localhost elasticsearch-head]# node_modules/grunt/bin/grunt server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100

如上,表示elasticsearch-head启动成功

访问elasticsearch-head

浏览器输入网址:http://192.168.1.20:9100/

参考网址

http://www.cnblogs.com/valor-xh/p/6293689.html

http://www.cnblogs.com/xing901022/p/6030296.html

如有错误,欢迎指正,共同学习。

centos7安装elasticsearch-head的更多相关文章

  1. Centos7安装elasticsearch、logstash、kibana、elasticsearch head

    环境:Centos7, jdk1.8 安装logstash 1.下载logstash 地址:https://artifacts.elastic.co/downloads/logstash/logsta ...

  2. centos7 安装 elasticsearch

    安装java环境 这里使用yum方式安装,前提是必须有网络 yum install java-1.8.0-openjdk 安装完成,查看java版本 [root@localhost ~]# java ...

  3. centos7安装Elasticsearch及Es-head插件详细教程(图文)

    懒惰了很久,今天来写一下Elasticsearch在centos7上安装教程以及安装过程中可能出现的报错解决方式,有不对的地方,烦请各位看官多多指教! 一.ES安装 1.环境检查 确保有java环境, ...

  4. centos7 安装elasticsearch

    [root@localhost local]# tar xzvf elasticsearch-2.3.5.tar.gz [root@localhost elasticsearch-2.3.5]# bi ...

  5. Centos7安装Elasticsearch和Kibana

    这里使用的6.6.0版本,ES需要JDK环境,对应1.8 Elasticsearch安装: 1.下载:https://elasticsearch.cn/download/ 2.解压: 3.修改配置:j ...

  6. centos7安装elasticsearch

    [root@aaron tools]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zi ...

  7. centos7环境安装ElasticSearch

    操作系统: Centos7 .64位 ========================================= 查看系统版本和系统位数: [root@localhost /]# cat /e ...

  8. Centos7下安装Elasticsearch 5.6.6

    环境 因为elasticsearch是用java编写的,所以需要先安装JDK ES 5,安装需要 JDK 8 以上ES 6.5,安装需要 JDK 11 以上ES 7.2.1,内置了 JDK 12 安装 ...

  9. 【elasticsearch】(2)centos7 超简单安装elasticsearch 的监控、测试的集群工具elasticsearch head

    elasticsearch-head是elasticsearch(下面称ES)比较普遍使用的可监控.测试等功能的集群管理工具,是由H5编写的单独的网页程序.使用方法网上很多,这里教大家一个超简单安装h ...

  10. ElasticSearch(一):CentOS7 安装 ElasticSearch6.4.0

    一.安装jre支持 在CentOS中安装ElasticSearch需要Java1.8.0,可执行命令#  java -version查看当前系统所安装Java版本是否为1.8.0版本. 若非1.8.0 ...

随机推荐

  1. 启动oracle command

    @echo off net start OracleXETNSListener >nul net start OracleServiceXE >nul

  2. 免费的ASP.NET空间和SQLServer2008 Express

      Login Register Web Hosting Support Forum Ask Experts Articles ASP.NET 4.5 & SQL 2012 Hosting P ...

  3. flask第十篇——url_for【3】

      继续url_for的知识点 # coding: utf-8 from flask import Flask, url_forimport flask app = Flask(__name__)   ...

  4. 支付宝支付集成过程中如何生成商户订单号(out_trade_no)

    out_trade_no是指商户网站唯一订单号,在商户端唯一,每个商户订单号会对应一个支付宝订单号 ,此订单号由珊瑚自己生成,商户订单号要求64个字符以内.可包含字母.数字.下划线:需保证在商户端不重 ...

  5. FastDFS安装注意事项

    配置中设定的目录必须提前创建,不会自动创建. 先启动所有tracker再启动storage,一个storage必须能连接到所有配置的tracker才会成功启动. Docker中运行fdfs必须使用ho ...

  6. 迭代函数:zip、enumerate,list解析

    #encoding:utf-8 """ 并行迭代: zip enumerate 获取元素及下标 list解析 iter """ #zip # ...

  7. android:提升 ListView 的运行效率

    之所以说 ListView 这个控件很难用,就是因为它有很多的细节可以优化,其中运行效率 就是很重要的一点.目前我们 ListView 的运行效率是很低的,因为在 FruitAdapter 的 get ...

  8. 在Objective-C 中使用字符生成NSArray、NSDictionary、NSNumber

    @符号不仅可以生成字符串,还可以生成其他数据类型如NSArray.NSDictionary和NSNumber,是一种简洁快速的用法. // NSArray array = [NSArray array ...

  9. VS2013中Python学习笔记[环境搭建]

    前言 Python是一个高层次的结合了解释性.编译性.互动性和面向对象的脚本语言. Python的设计具有很强的可读性,相比其他语言经常使用英文关键字,其他语言的一些标点符号,它具有比其他语言更有特色 ...

  10. iOS:使用NSRegularExpression正则去掉一串字符串中所有的特殊字符和标点

    一.介绍 在开发中,有时我们需要对一串字符串做特殊的处理后再使用,例如判断是不是特殊字符.去掉所有的特殊字符等.做处理的方法有很多,最简单的就是for循环遍历一个个的比较处理,最好用的应该是使用正则表 ...