elasticsearch数据库搭建 window版

elasticsearch数据库搭建 window版说明:安装elasticsearch之前必须安装好jdk运行环境1.首先下载安装包:这是官网最新安装包:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-windows-x86_64.zip2.直接解压到想要安装的目录即可 3.配置文件打开config下的elasticsearch.yml…

大家好,又见面了,我是你们的朋友全栈君。

说明:安装elasticsearch之前必须安装好jdk运行环境


  • 1.首先下载安装包:

这是官网最新安装包:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-windows-x86_64.zip

  • 2.直接解压到想要安装的目录即可
  • 3.配置文件

打开config下的elasticsearch.yml文件进行配置

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#集群名称
cluster.name: my-es
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#当前节点名称
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#数据存储位置
path.data: E:/elasticsearch/elasticsearch-6.8.3/data-es/data/
#
# Path to log files:
#
#日志存储位置
path.logs: E:/elasticsearch/elasticsearch-6.8.3/data-es/logs/
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#如果是单节点将其配置为false
bootstrap.memory_lock: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#可访问的主机
network.host: 192.168.1.211
#
# Set a custom port for HTTP:
#
#端口
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#集群的节点,多个这样配置["192.168.1.211","192.168.1.212"]
discovery.zen.ping.unicast.hosts: ["192.168.1.211"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 0
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
gateway.recover_after_nodes: 1
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
action.destructive_requires_name: true

将其名字配置成consumer_statistics.mapping

{"template":"consumer_statistics","order":2,"version":60001,"index_patterns":["consumer_statistics"],"settings":{"index":{"refresh_interval":"5s","max_result_window":"2147483647"}},"mappings":{"_default_":{"dynamic_templates":[{"message_field":{"path_match":"message","mapping":{"norms":false,"type":"text"},"match_mapping_type":"string"}},{"string_fields":{"mapping":{"norms":false,"type":"text","fields":{"keyword":{"ignore_above":1024,"type":"keyword"}}},"match_mapping_type":"string","match":"*"}}],"properties":{"@timestamp":{"type":"date"},"geoip":{"dynamic":true,"properties":{"ip":{"type":"ip"},"latitude":{"type":"half_float"},"location":{"type":"geo_point"},"longitude":{"type":"half_float"}}},"@version":{"type":"keyword"}}}},"aliases":{}}
  • 5.安装curl插件

链接:https://pan.baidu.com/s/1dQS4UfuagovhcXTCNehztw

提取码:ntxv

  • 6.给curb配置环境变量

elasticsearch数据库搭建 window版

elasticsearch数据库搭建 window版

  • 7.执行模板ip改为数据库es数据库的ip 模板名称也要对应,然后所在位置
curl -H "Content-Type: application/json" -XPUT http://192.168.1.211:9200/_template/consumer_statistics -d "@E:\consumer_statistics.mapping"

到此es数据库安装完成,下一步进行导入数据的操作:


安装logstash:https://mp.csdn.net/postedit/103905006

 

 

 

 

 

 

 

 

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/133998.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 原生js之字符串截取[通俗易懂]

    原生js之字符串截取[通俗易懂]字符串截取的方法有三种:slice(start,end+1),substring(start,end+1),substr(start,n).slice(start,end+1):两个参数时,参数指截取位置,截取含头不含尾;一个参数时,默认截取到字符串结尾。参数可以为负数,负数就倒着数位置。substring(start,end+1):两个参数时,参数指截取位置,截取含头不含…

    2022年5月24日
    36
  • landset8各波段_landsat8波段

    landset8各波段_landsat8波段Landsat8的不同波段组合说明(2013-08-0811:32:56)转载▼标签:landsat8oli陆地成像仪杂谈分类:遥感技术LandsatTM(ETM+)7个波段可以组合很多RGB方案用于不同地物的解译,Landsat8的OLI陆地成像仪包括9个波段,可以组合更多的RGB方案。OLI包括了ETM+传感器所有的波段,为了避免大气吸收特征,OLI对波段进行了重新调整,比较大的调整是OL…

    2022年7月23日
    7
  • 异常处理面试题_运行值长面试题

    异常处理面试题_运行值长面试题java提供了两种异常机制。一种是运行时异常(RuntimeExepction),一种是受检异常(checkedexecption)。受检异常:我们经常遇到的IO异常及sql异常就属于检查式异常。对于这种异常,java编译器要求我们必须对出现的这些异常进行catch,面对这种异常要么往上抛,要么就catch运行时异常:我们可以不处理。当出现这样的异常时,总是由虚拟机接管。RuntimeExec

    2022年9月30日
    2
  • hanoi(汉诺塔)的C语言实现

    hanoi(汉诺塔)的C语言实现基本思想 如图所示 代码如下 include stdio h voidmove intn charA charC printf c gt c n A C voidhanoi intn charA charB charC 将 n 个盘子由初始塔移动到目标塔 利用借用塔 if n 1 move 1 A C 只有一 stdio h

    2025年8月2日
    3
  • 模拟信号和数字信号的区别_模拟信号和数字信号的区别和特点

    模拟信号和数字信号的区别_模拟信号和数字信号的区别和特点根据信号中代表的取值参数的不同,信号可以分为两大类:模拟信号和数字信号1.模拟信号或连续信号指用连续变化的物理量所表达的信息,如温度、湿度、压力、长度、电流、电压等。我们通常又把模拟的信号称为连

    2022年8月2日
    5
  • Robotium体验—-白盒

    Robotium体验—-白盒什么是Robotium?先说一下发音。音标类似于[rəʊbɒʃɪəm],可参照有道。Robotium是一款开源测试框架,官方定义为AndroidApp的黑盒测试框架(官方示例为白盒),适用于native/hybridapp。由于开源,该框架源码可以从github上获取,地址为https://github.com/RobotiumTech/robotium。若需要文档,j…

    2022年7月17日
    10

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号