环境:

centos7

jdk8

参考:

https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html
http://blog.csdn.net/wh211212/article/details/54015645

1. 将Elasticsearch公共GPG密钥导入rpm

  1. rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

2.在/etc/yum.repos.d/目录中创建一个名为elasticsearch.repo的文件

  1. touch /etc/yum.repos.d/elasticsearch.repo
  2. vi /etc/yum.repos.d/elasticsearch.repo
  3. [elasticsearch-5.x]
  4. name=Elasticsearch repository for 5.x packages
  5. baseurl=https://artifacts.elastic.co/packages/5.x/yum
  6. gpgcheck=1
  7. gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
  8. enabled=1
  9. autorefresh=1
  10. type=rpm-md

3.Elasticsearch 源创建完成之后,通过makecache查看源是否可用,然后通过yum安装Elasticsearch

  1. yum makecache
  2. yum install elasticsearch -y

4.关闭防火墙

  1. systemctl stop firewalld.service

5.禁用防火墙

  1. system disable firewalld.service

6.启动 elasticsearch

  1. systemctl start elasticsearch.service

7.访问是否成功启动

  1. curl -XGET localhost:

响应

  1. curl: () Failed connect to localhost:; Connection refused

查看端口

  1. netstat -ano|grep elasticsearch
  2.  
  3. [root@guo yum.repos.d]# netstat -ano|grep
  4. tcp6 127.0.0.1: :::* LISTEN off (0.00//)
  5. tcp6 ::: :::* LISTEN

访问 curl -XGET 127.0.0.1:9200 正常

  1. [root@guo yum.repos.d]# curl -XGET 127.0.0.1:
  2. {
  3. "name" : "QcB_mvr",
  4. "cluster_name" : "elasticsearch",
  5. "cluster_uuid" : "-eNBlNxoRfeCRwLMDVQQcw",
  6. "version" : {
  7. "number" : "5.5.1",
  8. "build_hash" : "19c13d0",
  9. "build_date" : "2017-07-18T20:44:24.823Z",
  10. "build_snapshot" : false,
  11. "lucene_version" : "6.6.0"
  12. },
  13. "tagline" : "You Know, for Search"
  14. }

添加/etc/hosts

  1. 127.0.0.1 localhost

再次访问就ok了

  1. [root@guo yum.repos.d]# curl -XGET localhost:
  2. {
  3. "name" : "QcB_mvr",
  4. "cluster_name" : "elasticsearch",
  5. "cluster_uuid" : "-eNBlNxoRfeCRwLMDVQQcw",
  6. "version" : {
  7. "number" : "5.5.1",
  8. "build_hash" : "19c13d0",
  9. "build_date" : "2017-07-18T20:44:24.823Z",
  10. "build_snapshot" : false,
  11. "lucene_version" : "6.6.0"
  12. },
  13. "tagline" : "You Know, for Search"
  14. }

8.修改配置,打开注释  network.host,http.port

  1. vi /etc/elasticsearch/elasticsearch.yml
  2. # ---------------------------------- Network -----------------------------------
  3. #
  4. # Set the bind address to a specific IP (IPv4 or IPv6):
  5. #
  6. network.host: guo
  7. #
  8. # Set a custom port for HTTP:
  9. #
  10. http.port:
  11. #
  12. # For more information, consult the network module documentation.

9.重启,然后再宿主机浏览器访问

  1. systemctl stop elasticsearch.service
  2. systemctl start elasticsearch.service

10.查看日志

  1. tail -f /var/log/elasticsearch/elasticsearch.log

elk之elasticsearch安装的更多相关文章

  1. ELK之elasticsearch安装&&kibana安装

    1.ES和Kibana安装都是开箱即用的? 解压缩就可以用 elasticsearch解压缩之后,双击下图中的elasticsearch.bat,启动,kibana也是一样 双击之后, 我们看到上图有 ...

  2. ELK实战-elasticsearch安装

    操作系统: centos版本 7.4 防火墙 关闭 selinux 关闭 elasticsearch版本 6.3.2 java版本 1.8 server1 192.168.10.126 server2 ...

  3. ELK日志监控平台安装部署简介--Elasticsearch安装部署

    最近由于工作需要,需要搭建一个ELK日志监控平台,本次采用Filebeat(采集数据)+Elasticsearch(建立索引)+Kibana(展示)架构,实现日志搜索展示功能. 一.安装环境描述: 1 ...

  4. ELK技术实战-安装Elk 5.x平台

    ELK技术实战–了解Elk各组件   转载  http://www.ywnds.com/?p=9776 ELK技术实战-部署Elk 2.x平台 ELK Stack是软件集合Elasticsearch. ...

  5. ELK之elasticsearch6安装认证模块search guard

    参考:https://www.cnblogs.com/marility/p/9392645.html 1,安装环境及软件版本 程序 版本 安装方式  elasticsearch  6.3.1  rpm ...

  6. Centos7中ELK集群安装流程

    Centos7中ELK集群安装流程   说明:三个版本必须相同,这里安装5.1版. 一.安装Elasticsearch5.1   hostnamectl set-hostname elk vim /e ...

  7. Kibana安装(图文详解)(多节点的ELK集群安装在一个节点就好)

    对于Kibana ,我们知道,是Elasticsearch/Logstash/Kibana的必不可少成员. 前提: Elasticsearch-2.4.3的下载(图文详解) Elasticsearch ...

  8. 全文搜索引擎 Elasticsearch 安装

    全文搜索引擎 Elasticsearch 安装 学习了:http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html 拼音:https://www ...

  9. Filebeat-1.3.1安装和设置(图文详解)(多节点的ELK集群安装在一个节点就好)(以Console Output为例)

    前期博客 Filebeat的下载(图文讲解) 前提 Elasticsearch-2.4.3的下载(图文详解) Elasticsearch-2.4.3的单节点安装(多种方式图文详解) Elasticse ...

随机推荐

  1. English trip V1 - B 13. Are you a model? 你是模特吗? Teacher:Patrick Key: 单词回顾、词性后缀

    因为这节课本身内容过于So easy~ Patrick给我补充了很多课外内容 课上内容(Lesson) I doesn't work  2层意思 1) 东西坏了,这个东西不能正常工作了.比如钟不走时间 ...

  2. Using the G711 standard

    Using the G711 standard Marc Sweetgall,                          28 Jul 2006    4.74 (27 votes) 1 2 ...

  3. Practical Node.js (2018版) 第7章:Boosting Node.js and Mongoose

    参考:博客 https://www.cnblogs.com/chentianwei/p/10268346.html 参考: mongoose官网(https://mongoosejs.com/docs ...

  4. hdu-4080 Stammering Aliens 字符串hash 模板题

    http://acm.hdu.edu.cn/showproblem.php?pid=4080 求出现次数大于等于n的最长串. #include<iostream> #include< ...

  5. Single Number II leetcode java

    问题描述: Given an array of integers, every element appears three times except for one. Find that single ...

  6. WCF开发实战系列一:创建第一个WCF服务 转

    转 http://www.cnblogs.com/poissonnotes/archive/2010/08/28/1811064.html 在这个实战中我们将使用DataContract,Servic ...

  7. C# 语法特性 - 泛型(C#2.0)

    泛型将 类型参数 的概念引入了 .NET Framework. 泛型主要有两个优点: 1.编译时可以保证类型安全. 2.不用做类型转换,获得一定的性能提升. 泛型方法.泛型委托.泛型接口 除了泛型类之 ...

  8. [LightOJ 1027] A Dangerous Maze

    A Dangerous Maze You are in a maze; seeing n doors in front of you in beginning. You can choose any ...

  9. 十、 持久层框架(MyBatis)

    一.基于MyBatis动态SQL语句 1.if标签 实体类Product的字段比较多的时候,为了应付各个字段的查询,那么就需要写多条SQL语句,这样就变得难以维护. 此时,就可以使用MyBatis动态 ...

  10. oracle 分组查询

    常用的函数:            ·:统计个数:COUNT(),根据表中的实际数据量返回结果:            ·:求和:SUM(),是针对于数字的统计,求和            ·:平均值 ...