首页 > 编程知识 正文

elasticsearch 安装ik分词器,elasticsearch windows安装

时间:2023-05-06 08:33:44 阅读:201969 作者:4770

下载elasticsearch最新版本(当前最新版本6.4.1):https://www.elastic.co/cn/downloads/elasticsearch
解压压缩包至指定路径,程序启动入口 elasticsearch-6.4.0tmdrjbelasticsearch.bat
elasticsearch 启动闪退解决:elasticsearch 依赖JDK,必须是1.8以上版本JDK
安装配置1.8版本以上JDK,为 elasticsearch 指定JDK 路径。
配置JDK1.8环境变量 ES_JDK : C:Program FilesJavajdk1.8.0_181
打开 elasticsearch-6.4.0tmdrjbelasticsearch-env

# now set the path to javaif [ -x "$ES_JDK/tmdrjb/java" ]; then JAVA="$ES_JDK/tmdrjb/java"else set +e JAVA=`which java` set -efi

大概在39 - 40 行 将JAVA_HOME换成刚刚配置的ES_JDK。
打开 elasticsearch-6.4.0tmdrjbelasticsearch-env.bat

rem now set the path to javaif defined JAVA_HOME ( set JAVA="%ES_JDK%tmdrjbjava.exe") else ( for %%I in (java.exe) do set JAVA="%%~$PATH:I")在19 - 20 行 将set JAVA="%JAVA_HOME%tmdrjbjava.exe" 改成 set JAVA="%ES_JDK%tmdrjbjava.exe"

elasticsearch 程序启动成功。
elasticsearch 基本配置,打开 elasticsearch-6.4.0configelasticsearch.yml

# ---------------------------------- Cluster ----------------------------------- # Use a descriptive name for your cluster:集群名称 cluster.name: xxx # ------------------------------------ Node ------------------------------------ # Use a descriptive name for the node:节点名称 node.name: xxx # Add custom attributes to the node: #node.attr.rack: r1 # ----------------------------------- Memory -----------------------------------## Lock the memory on startup:#bootstrap.memory_lock: true# 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 tmdrjbd address to a specific IP (IPv4 or IPv6):#network.host: 192.168.0.1 network.host: 127.0.0.1# Set a custom port for HTTP:http.port: 9200#transport.tcp.port: 9300# For more information, consult the network module documentation.

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。