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/

相关推荐
The Straggling Crow10 小时前
熟练版本控制 (Git)、CI/CD 流程。
git·elasticsearch·ci/cd
失伟13 小时前
CDC(数据变更捕获)场景应用
mongodb·elasticsearch·kafka·kafka-connect
Elasticsearch13 小时前
使用 LangGraph . js 和 Elasticsearch 构建一个金融 AI 搜索工作流
elasticsearch
武子康14 小时前
大数据-175 Elasticsearch Term 精确查询与 Bool 组合实战:range/regexp/fuzzy 全示例
大数据·后端·elasticsearch
悟悟悟!16 小时前
git使用笔记:git日常工作流和命名规范
笔记·git·elasticsearch
漏洞文库-Web安全16 小时前
CTFHub 信息泄露通关笔记9:Git泄露 Index - 指南
笔记·git·安全·web安全·elasticsearch·网络安全·ctf
liliangcsdn17 小时前
elasticsearch全文搜索索引结构示例
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客1 天前
Elasticsearch 中使用 NVIDIA cuVS 实现最高快 12 倍的向量索引速度:GPU 加速第 2 章
大数据·人工智能·elasticsearch·搜索引擎·ai·全文检索·数据库架构
微扬嘴角1 天前
springcloud篇7-ElasticSearch分布式搜索
elasticsearch·spring cloud
Elastic 中国社区官方博客1 天前
Elasticsearch 中的文档级基于属性的访问控制 - ABAC
大数据·数据库·elasticsearch·搜索引擎·全文检索