Elasticsearch 安装记录

Elasticsearch 安装记录

下载地址

安装包目录结构

目录描述
binelasticsearch 相关脚本文件
config配置文件
data数据(初次运行后会生成)
jdkelasticsearch 7 自带 jdk【OpenJDK 13】
lib依赖类库
logs日志
moduleselasticsearch 模块
plugins已安装 elasticsearch 插件

config

jvm.options JVM 配置

-Xms1g
-Xmx1g

配置建议:

  1. Xmx 与 Xms 设置一致
  2. Xmx 不超过机器内存的 50%
  3. 内存设置不要超过 30 G

elasticsearch.yml

network.host: 0.0.0.0

错误信息

ERROR: [2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
ERROR: Elasticsearch did not exit normally - check the logs at /home/sanchan/soft/elasticsearch-7.6.2/logs/elasticsearch.log

错误一:vm.max_map_cout

  1. sudo vim /etc/sysctl.conf,在最后添加 vm.max_map_count=655360

  2. 执行命令 sudo sysctl -p

错误二:the default discovery settings are unsuitable for production use

  1. 修改 elasticsearch.yml 搜索 cluster.initial_master_nodes: ["node-1"] 将其注释取消
{
  "name" : "coderknock-ubuntu",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "5sYuE_TjRwK27pmKtp9Jjw",
  "version" : {
    "number" : "7.6.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
    "build_date" : "2020-03-26T06:34:37.794943Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
# 入门 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×