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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 【《重构 改善既有代码的设计》学习笔记4】构筑测试体系

    本篇文章的内容来自《重构 改善既有代码的设计》一书学习笔记整理并且加上自己的浅显的思考总结!如果想要进行重构,首要前提是 拥有一个可靠的测试环境。1、 自测代码的价值完成一个功能:设计+开发+调试,认真分析,程序员最多花费的时间不是开发(编码),而是用来调试。调试可能花费无数个小时,甚至通宵达旦。修复错误是快速的,而找出错误却是恶梦一场。当修复好一个错误,总是会有另一个错误的出现。而引…

    2022年2月27日
    45
  • pytest报错_git是什么

    pytest报错_git是什么前言我们每天写完自动化用例后都会提交到git仓库,随着用例的增多,为了保证仓库代码的干净,当有用例新增的时候,我们希望只运行新增的未提交git仓库的用例。pytest-picked插件可以

    2022年7月31日
    7
  • db4o的使用

    db4o的使用from:http://www.ibm.com/developerworks/cn/java/j-lo-db4o2/index.html前言在 db4o之旅 系列文章的第一部分:初识db4o 中,作者介绍了db4o的历史和现状,应用领域,以及和ORM等的比较。在这篇文章中,作者将会介绍db4o的安装、启动以及三种不同的查询方式:QBE(QuerybyEx

    2022年7月21日
    20
  • html空格符号怎么打_正则表达式求字符串中空格的个数

    html空格符号怎么打_正则表达式求字符串中空格的个数 我们平时键盘空格的空格符号。

    2022年10月5日
    3
  • Eureka原理理解和Eureka集群搭建

    Eureka原理理解和Eureka集群搭建简介Eureka是Netflix开发的服务发现组件,本身是一个基于REST的服务。springcloud框架集成了Eureka,在微服务架构中充当注册中心的角色,方便管理各种微服务。Eureka原理Eureka分为EurekaServer和EurekaClient及服务端和客户端。EurekaServer为注册中心,是服务端,而服务提供者和消费者即为客户端,消费者也可以是服…

    2022年6月6日
    39
  • datagri激活码[最新免费获取]

    (datagri激活码)这是一篇idea技术相关文章,由全栈君为大家提供,主要知识点是关于2021JetBrains全家桶永久激活码的内容https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~1STL5S9V8F-eyJsaWNlb…

    2022年3月27日
    77

发表回复

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

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