elasticsearch 7安装

问题提前报

max virtual memory areas error

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

如果您的环境是Linux,注意要做以下操作,否则es可能会启动失败

1 用编辑工具打开文件/etc/sysctl.conf

2 在尾部添加一行配置vm.max_map_count = 262144,如果已存在就修改,数值不能低于262144

3 修改保存,然后执行命令sudo sysctl -p使其立即生效

heap size error

initial heap size [1073741824] not equal to maximum heap size [4294967296]; this can cause resize pauses and prevents mlockall from locking the entire heap

原因是 ES_JAVA_OPTS 设置错误,前后必须相同,如

-Xms3g -Xmx3g

手动安装es

下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.15-linux-x86_64.tar.gz

解压

shell 复制代码
tar -zxvf elasticsearch-7.17.15-linux-x86_64.tar.gz
mv elasticsearch-7.17.15 /usr/local/elasticsearch

添加用户

shell 复制代码
useradd es
passwd es
chown -R es:es /usr/local/elasticsearch

配置文件修改

vim elasticsearch.yml

yaml 复制代码
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: "[::1]"
cluster.initial_master_nodes: ["node-1"]

启动

/usr/local/elasticsearch/bin/elasticsearch -d

访问验证

http://127.0.0.1:9200/

相关推荐
liupenglove6 小时前
自动驾驶数据仓库:时间片合并算法。
大数据·数据仓库·算法·elasticsearch·自动驾驶
野生技术架构师7 小时前
MySQL数据实时同步到Elasticsearch的高效解决方案
数据库·mysql·elasticsearch
risc1234568 小时前
【Lucene/Elasticsearch】 数据类型(ES 字段类型) | 底层索引结构
elasticsearch
全能搬运大师9 小时前
win10安装Elasticsearch
大数据·elasticsearch·搜索引擎
舒一笑10 小时前
如何讲解es中的倒排索引我是一个小白给我解释
后端·elasticsearch
是小pa丫17 小时前
ElasticSearch重置密码
elasticsearch
南城尽相思19 小时前
es的自定义词典和停用词
elasticsearch·搜索引擎
孟猛202320 小时前
使用 C++ 调用 Elasticsearch API
elasticsearch
寅鸷1 天前
es里为什么node和shard不是一对一的关系
大数据·elasticsearch
阿里云大数据AI技术2 天前
如何在 Elasticsearch 中构建你的智能 AI 助手?
运维·人工智能·elasticsearch