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)
上一篇 2022年6月7日 下午4:00
下一篇 2022年6月7日 下午4:00


相关推荐

  • C# 条件运算符_c++ 运算符

    C# 条件运算符_c++ 运算符usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespace_0212_条件运算符{classProgram{//?一、C#条件运算符(?:)…

    2022年10月2日
    3
  • 内点法[通俗易懂]

    内点法[通俗易懂]内点法属于约束优化算法。约束优化算法的基本思想是:通过引入效用函数的方法将约束优化问题转换成无约束问题,再利用优化迭代过程不断地更新效用函数,以使得算法收敛。内点法(罚函数法的一种)的主要思想是:

    2022年8月4日
    7
  • pycharm指令_ftp登录及命令行用法

    pycharm指令_ftp登录及命令行用法“阅读本文大概需要3分钟。”相信很多人使用PyCharm来开发Python程序,但却少有人知道,PyCharm实际上有一个命令行程序。通过这个命令行程序可以帮你做很多事…

    2022年8月26日
    11
  • MySQL 5.7root用户密码修改[通俗易懂]

    MySQL 5.7root用户密码修改[通俗易懂]在MySQL5.7password字段已从mysql.user表中删除,新的字段名是“authenticalion_string”.选择数据库:usemysql;更新root的密码:updateusersetauthentication_string=password(‘新密码’)whereuser=’root’andHost=’localhost’;刷新权限:fl…

    2022年6月25日
    38
  • InnoDB数据库隔离级别

    InnoDB数据库隔离级别事务隔离级别分为四种(级别递减):1、Serializable(串行化):最严格的级别,事务串行执行,资源消耗最大;2、REPEATABLEREAD(重复读):保证了一个事务不会修改已经由另一个事务读取但未提交(回滚)的数据。避免了“脏读取”和“不可重复读取”的情况,但不能避免“幻读”,但是带来了更多的性能损失。3、READCOMMITTED(提交读):大多数主流数据库的默认事…

    2022年5月18日
    35
  • C语言实现超简单贪吃蛇(代码是抄的),我做一下讲解

    C语言实现超简单贪吃蛇(代码是抄的),我做一下讲解首先声明,代码是抄的,代码是抄的,代码是抄的,重要的事情说三遍。。如果有侵权请联系我删除。。贴原作者的视频。在b站看的,视频找不到了,我等下会贴代码。。先分析一下游戏的数据结构:1.游戏地图用一个数组bk[20][20]存储,有四种状态。0表示没东西;1表示墙;2表示果实;3表示蛇。2.用xy[2]来存放蛇前进的坐标,xy[0]表示横坐标,xy[1]表示纵坐标。。3.move[20][20]表示蛇…

    2022年5月26日
    40

发表回复

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

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